|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.tidalwave.imageio.raw.Directory
public abstract class Directory
| Nested Class Summary | |
|---|---|
static class |
Directory.Enumeration
This class models an enumerated value for a tag. |
| Field Summary | |
|---|---|
protected long |
end
|
Directory |
nextDirectory
|
protected long |
start
|
protected TagRegistry |
tagRegistry
The registry the contained tags belongs to. |
| Constructor Summary | |
|---|---|
protected |
Directory()
For de-serialization only. |
protected |
Directory(TagRegistry tagRegistry)
Creates a new Directory whose tags belong to the given registry. |
| Method Summary | |
|---|---|
void |
addDirectory(Directory subDirectory)
Adds a sub-directory. |
void |
addNamedDirectory(java.lang.String name,
Directory subDirectory)
Adds a named sub-directory. |
void |
addTag(AbstractTag tag)
Adds a tag to this Directory. |
static double[] |
asDoubles(TagRational[] rationals)
Convenience method that converts an array of rationals into doubles. |
static float[] |
asFloats(TagRational[] rationals)
Convenience method that converts an array of rationals into floats. |
boolean |
containsTag(java.lang.Object key)
Checks if this Directory contains a given tag. |
int |
getByte(java.lang.Object key)
Returns the tag value as a byte. |
byte[] |
getBytes(java.lang.Object key)
Returns the tag values as bytes. |
double |
getDouble(java.lang.Object key)
Returns the tag value as a double. |
double[] |
getDoubles(java.lang.Object key)
Returns the tag values as doubles. |
long |
getEnd()
|
float |
getFloat(java.lang.Object key)
Returns the tag value as a float. |
float[] |
getFloats(java.lang.Object key)
Returns the tag values as floats. |
int |
getInteger(java.lang.Object key)
Returns the tag value as an integer. |
int[] |
getIntegers(java.lang.Object key)
Returns the tag values as integers. |
Directory |
getNamedDirectory(java.lang.String name)
Returns a named sub-directory |
Directory |
getNextDirectory()
|
java.lang.Object |
getObject(java.lang.Object key)
FIXME: This method is only provided for supporting it.tidalwave.image.DirectorySupport, but should be replaced with a more decoupled mechanism. |
TagRational |
getRational(java.lang.Object key)
Returns the tag value as a rational. |
TagRational[] |
getRationals(java.lang.Object key)
Returns the tag values as rationals. |
TagRegistry |
getRegistry()
Returns the registry the contained tags belong to. |
long |
getStart()
|
java.lang.String |
getString(java.lang.Object key)
Returns the tag value as a string. |
java.lang.String[] |
getSubDirectoryNames()
Returns the names of named sub directories |
AbstractTag |
getTag(java.lang.Object key)
Retrieves a contained tag given its key. |
java.lang.String |
getTagName(java.lang.Object key)
Returns the name of the given tag. |
abstract long |
load(RAWImageInputStream iis,
long offset)
|
void |
loadAll(RAWImageInputStream iis,
long offset)
|
AbstractTag |
removeTag(java.lang.Object key)
Removes a given tag from this Directory |
java.util.Iterator |
subDirectories()
Returns an iterator over sub-directories. |
java.util.Collection |
tags()
Returns the contained tags in the same order as they were added. |
java.lang.String |
toString()
|
protected java.lang.String |
toString(byte[] array)
|
protected java.lang.String |
toString(double[] array)
|
protected java.lang.String |
toString(int[] array)
|
protected java.lang.String |
toString(TagRational[] array)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected long start
protected long end
public Directory nextDirectory
protected transient TagRegistry tagRegistry
| Constructor Detail |
|---|
protected Directory()
protected Directory(TagRegistry tagRegistry)
Directory whose tags belong to the given registry.
tagRegistry - the registry| Method Detail |
|---|
public TagRegistry getRegistry()
public long getStart()
public long getEnd()
public abstract long load(RAWImageInputStream iis,
long offset)
throws java.io.IOException
iis - offset -
java.io.IOException
public void loadAll(RAWImageInputStream iis,
long offset)
throws java.io.IOException
iis - offset -
java.io.IOExceptionpublic void addTag(AbstractTag tag)
Directory.
tag - the tag to addpublic AbstractTag getTag(java.lang.Object key)
key - the tag keypublic boolean containsTag(java.lang.Object key)
Directory contains a given tag.
key - the tag key
Directory contains the tagpublic AbstractTag removeTag(java.lang.Object key)
key - the tag key
public java.lang.String getTagName(java.lang.Object key)
key - the tag key
public java.lang.Object getObject(java.lang.Object key)
public byte[] getBytes(java.lang.Object key)
key - the tag key
public int getByte(java.lang.Object key)
key - the tag key
java.util.NoSuchElementException - if the tag is not presentpublic TagRational[] getRationals(java.lang.Object key)
key - the tag key
public TagRational getRational(java.lang.Object key)
key - the tag key
java.util.NoSuchElementException - if the tag is not presentpublic double[] getDoubles(java.lang.Object key)
key - the tag key
public double getDouble(java.lang.Object key)
key - the tag key
java.util.NoSuchElementException - if the tag is not presentpublic float[] getFloats(java.lang.Object key)
key - the tag key
public float getFloat(java.lang.Object key)
key - the tag key
java.util.NoSuchElementException - if the tag is not presentpublic int[] getIntegers(java.lang.Object key)
key - the tag key
public int getInteger(java.lang.Object key)
throws java.util.NoSuchElementException
key - the tag key
java.util.NoSuchElementException - if the tag is not presentpublic java.lang.String getString(java.lang.Object key)
key - the tag key
public Directory getNextDirectory()
public void addDirectory(Directory subDirectory)
subDirectory - the sub-directorypublic java.util.Iterator subDirectories()
public void addNamedDirectory(java.lang.String name,
Directory subDirectory)
name - the directory namesubDirectory - the sub-directorypublic Directory getNamedDirectory(java.lang.String name)
name - the sub-directory name
public java.lang.String[] getSubDirectoryNames()
public java.util.Collection tags()
public static float[] asFloats(TagRational[] rationals)
rationals -
public static double[] asDoubles(TagRational[] rationals)
rationals -
public java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String toString(byte[] array)
protected java.lang.String toString(int[] array)
protected java.lang.String toString(double[] array)
protected java.lang.String toString(TagRational[] array)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||