com.drew.metadata
public abstract class Directory extends Object implements Serializable
Field Summary | |
---|---|
protected List | _definedTagList
A convenient list holding tag values in the order in which they were stored.
|
protected TagDescriptor | _descriptor
The descriptor used to interperet tag values. |
protected HashMap | _tagMap
Map of values hashed by type identifiers. |
Constructor Summary | |
---|---|
Directory()
Creates a new Directory. |
Method Summary | |
---|---|
void | addError(String message) |
boolean | containsTag(int tagType)
Indicates whether the specified tag type has been set. |
boolean | getBoolean(int tagType)
Returns the specified tag's value as a boolean, if possible. |
byte[] | getByteArray(int tagType)
Gets the specified tag's value as an byte array, if possible. |
Date | getDate(int tagType)
Returns the specified tag's value as a java.util.Date, if possible. |
String | getDescription(int tagType)
Provides a description of a tag's value using the descriptor set by
setDescriptor(Descriptor) . |
double | getDouble(int tagType)
Returns the specified tag's value as a double, if possible. |
int | getErrorCount() |
Iterator | getErrors() |
float | getFloat(int tagType)
Returns the specified tag's value as a float, if possible. |
int | getInt(int tagType)
Returns the specified tag's value as an int, if possible. |
int[] | getIntArray(int tagType)
Gets the specified tag's value as an int array, if possible. |
long | getLong(int tagType)
Returns the specified tag's value as a long, if possible. |
abstract String | getName()
Provides the name of the directory, for display purposes. |
Object | getObject(int tagType)
Returns the object hashed for the particular tag type specified, if available. |
Rational | getRational(int tagType)
Returns the specified tag's value as a Rational, if possible. |
Rational[] | getRationalArray(int tagType) |
String | getString(int tagType)
Returns the specified tag's value as a String. |
String[] | getStringArray(int tagType)
Gets the specified tag's value as a String array, if possible. |
int | getTagCount()
Returns the number of tags set in this Directory. |
Iterator | getTagIterator()
Returns an Iterator of Tag instances that have been set in this Directory. |
String | getTagName(int tagType)
Returns the name of a specified tag as a String. |
protected abstract HashMap | getTagNameMap()
Provides the map of tag names, hashed by tag type identifier. |
boolean | hasErrors() |
void | setBoolean(int tagType, boolean value)
Sets an int value for the specified tag. |
void | setByteArray(int tagType, byte[] bytes)
Sets a byte array for the specified tag. |
void | setDate(int tagType, Date value)
Sets a java.util.Date value for the specified tag. |
void | setDescriptor(TagDescriptor descriptor)
Sets the descriptor used to interperet tag values. |
void | setDouble(int tagType, double value)
Sets a double value for the specified tag. |
void | setFloat(int tagType, float value)
Sets a float value for the specified tag. |
void | setInt(int tagType, int value)
Sets an int value for the specified tag. |
void | setIntArray(int tagType, int[] ints)
Sets an int array for the specified tag. |
void | setLong(int tagType, long value)
Sets a long value for the specified tag. |
void | setObject(int tagType, Object value)
Private helper method, containing common functionality for all 'add'
methods. |
void | setObjectArray(int tagType, Object array)
Private helper method, containing common functionality for all 'add...Array'
methods. |
void | setRational(int tagType, Rational rational)
Sets a Rational value for the specified tag. |
void | setRationalArray(int tagType, Rational[] rationals)
Sets a Rational array for the specified tag. |
void | setString(int tagType, String value)
Sets an int value for the specified tag. |
void | setStringArray(int tagType, String[] strings)
Sets a String array for the specified tag. |
Parameters: tagType the tag type to check for
Returns: true if a value exists for the specified tag type, false if not
Parameters: tagType the tag identifier
Returns: the tag's value as a byte array
Throws: MetadataException if the tag has not been set, or cannot be converted to a byte array
setDescriptor(Descriptor)
.Parameters: tagType the tag type identifier
Returns: the tag value's description as a String
Throws: MetadataException if a descriptor hasn't been set, or if an error occurs during calculation of the description within the Descriptor
Parameters: tagType the tag identifier
Returns: the tag's value as an int array
Throws: MetadataException if the tag has not been set, or cannot be converted to an int array
Exif
Returns: the name of the directory
Parameters: tagType the tag type identifier
Returns: the tag's value as an Object if available, else null
Returns: the String reprensentation of the tag's value, or
null
if the tag hasn't been defined.
Parameters: tagType the tag identifier
Returns: the tag's value as an array of Strings
Throws: MetadataException if the tag has not been set or cannot be represented as a String[]
Returns: the number of tags set in this Directory
Returns: an Iterator of Tag instances
Parameters: tagType the tag type identifier
Returns: the tag's name as a String
Returns: the map of tag names
Parameters: tagType the tag's value as an int value the value for the specified tag as a boolean
Parameters: tagType the tag identifier bytes the byte array to store
Parameters: tagType the tag's value as an int value the value for the specified tag as a java.util.Date
Parameters: descriptor the descriptor used to interperet tag values
Parameters: tagType the tag's value as an int value the value for the specified tag as a double
Parameters: tagType the tag's value as an int value the value for the specified tag as a float
Parameters: tagType the tag's value as an int value the value for the specified tag as an int
Parameters: tagType the tag identifier ints the int array to store
Parameters: tagType the tag's value as an int value the value for the specified tag as a long
Parameters: tagType the tag's value as an int value the value for the specified tag
Throws: NullPointerException if value is null
Parameters: tagType the tag's value as an int array the array of values for the specified tag
Parameters: tagType the tag's value as an int rational rational number
Parameters: tagType the tag identifier rationals the Rational array to store
Parameters: tagType the tag's value as an int value the value for the specified tag as a String
Parameters: tagType the tag identifier strings the String array to store