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:
  • Field Details

    • ASCII

      public static final byte[] ASCII
    • JIS

      public static final byte[] JIS
    • UNDEFINED

      public static final byte[] UNDEFINED
  • Method Details

    • 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