org.w3c.tools.jpeg
Class ExifData
java.lang.Object
org.w3c.tools.jpeg.ExifData
public class ExifData
- extends java.lang.Object
An internal API for decoding EXIF data.
This class identifies a byte array as valid EXIF and provides methods
for converting the internal representation of types to equivalent Java
types.
This is a separate class in order to facilitate writing decoders for
unknown fields.
Special note: string values are %-encoded to protect the caller from
values that might not be legitimate UTF-8 strings.
Bugs:
The EXIF format includes unsigned integers which aren't directly
available in Java. Unless I'm mistaken, they'd have to be turned into
longs. But that would
be inconvenient in other APIs. For the moment, I'm just treating them all as
signed. I've never seen an EXIF unsigned value too large to represent
in a Java int.
- See Also:
Exif
Constructor Summary |
ExifData(byte[] exifData)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bytesPerFormat
public static final int[] bytesPerFormat
NUM_FORMATS
public static final int NUM_FORMATS
- See Also:
- Constant Field Values
FMT_BYTE
public static final int FMT_BYTE
- See Also:
- Constant Field Values
FMT_STRING
public static final int FMT_STRING
- See Also:
- Constant Field Values
FMT_USHORT
public static final int FMT_USHORT
- See Also:
- Constant Field Values
FMT_ULONG
public static final int FMT_ULONG
- See Also:
- Constant Field Values
FMT_URATIONAL
public static final int FMT_URATIONAL
- See Also:
- Constant Field Values
FMT_SBYTE
public static final int FMT_SBYTE
- See Also:
- Constant Field Values
FMT_UNDEFINED
public static final int FMT_UNDEFINED
- See Also:
- Constant Field Values
FMT_SSHORT
public static final int FMT_SSHORT
- See Also:
- Constant Field Values
FMT_SLONG
public static final int FMT_SLONG
- See Also:
- Constant Field Values
FMT_SRATIONAL
public static final int FMT_SRATIONAL
- See Also:
- Constant Field Values
FMT_SINGLE
public static final int FMT_SINGLE
- See Also:
- Constant Field Values
FMT_DOUBLE
public static final int FMT_DOUBLE
- See Also:
- Constant Field Values
ExifData
public ExifData(byte[] exifData)
isExifData
public boolean isExifData()
get16s
public int get16s(int offset)
get16u
public int get16u(int offset)
get32s
public int get32s(int offset)
get32u
public int get32u(int offset)
getBytes
public byte[] getBytes(int offset,
int length)
getString
public java.lang.String getString(int offset,
int length)
getUndefined
public java.lang.String getUndefined(int offset,
int length)
getString
protected java.lang.String getString(int offset,
int length,
boolean nullTerminated)
convertAnyValue
public double convertAnyValue(int format,
int offset)