Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.picture
Class ExifHelper

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

public class ExifHelper
extends 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
           
 
Method Summary
static 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
Method Detail

decodeUndefined

public static 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

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.