Package org.nuxeo.ecm.platform.picture
Class ExifHelper
- java.lang.Object
-
- org.nuxeo.ecm.platform.picture.ExifHelper
-
public class ExifHelper extends Object
Helper to handle the UNDEFINED Exif data type.- Author:
- btatar
- See Also:
- Exif Comments
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 arraybeginIndex
- the begin index which is zero basedendIndex
- the end index which is not zero based
-
-