Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.picture
Class ExifHelper

java.lang.Object
  extended by org.nuxeo.ecm.platform.picture.ExifHelper

public class ExifHelper
extends java.lang.Object

Helper to handle the UNDEFINED Exif data type.

See http://www.leadtools.com/help/leadtools/v15/Main/API/Dllaux/ExifComments.htm.

Author:
btatar

Field Summary
static byte[] ASCII
           
static byte[] JIS
           
static Log log
           
static byte[] UNDEFINED
           
 
Constructor Summary
ExifHelper()
           
 
Method Summary
static java.lang.String decodeUndefined(byte[] rawBytes)
          Method used to perform the decode of the Exif User comment data type.
static byte[] extractBytes(byte[] bytes, int beginIndex, int endIndex)
          Extracts the bytes from the received byte array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final Log log

ASCII

public static final byte[] ASCII

JIS

public static final byte[] JIS

UNDEFINED

public static final byte[] UNDEFINED
Constructor Detail

ExifHelper

public ExifHelper()
Method Detail

decodeUndefined

public static java.lang.String decodeUndefined(byte[] rawBytes)
Method used to perform the decode of the Exif User comment data type. The first eight bytes specify the data format, and the remainder of the comment is in the specified format.The first eight bytes can be any of the following cases: 65, 83, 67, 73, 73, 0, 0, 0 = ASCII 74, 73, 83, 0, 0, 0, 0, 0 = JIS 0, 0, 0, 0, 0, 0, 0, 0 = UNDEFINED

Parameters:
rawBytes - - the user comment represented as a byte array
Returns:
- the user comment as a String on the format retrieved from the data type.

extractBytes

public static byte[] extractBytes(byte[] bytes,
                                  int beginIndex,
                                  int endIndex)
Extracts the bytes from the received byte array. The first argument represents the starting location (zero-based) and the second argument represent the ending location which is not zero based.

Parameters:
bytes - the byte array
beginIndex - the begin index which is zero based
endIndex - the end index which is not zero based
Returns:

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.