Java Doc for TIFFDirectory.java in  » Graphic-Library » xmlgraphics-commons-1.2 » org » apache » xmlgraphics » image » codec » tiff » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » xmlgraphics commons 1.2 » org.apache.xmlgraphics.image.codec.tiff 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xmlgraphics.image.codec.tiff.TIFFDirectory

TIFFDirectory
public class TIFFDirectory extends Object implements Serializable(Code)
A class representing an Image File Directory (IFD) from a TIFF 6.0 stream. The TIFF file format is described in more detail in the comments for the TIFFDescriptor class.

A TIFF IFD consists of a set of TIFFField tags. Methods are provided to query the set of tags and to obtain the raw field array. In addition, convenience methods are provided for acquiring the values of tags that contain a single value that fits into a byte, int, long, float, or double.

Every TIFF file is made up of one or more public IFDs that are joined in a linked list, rooted in the file header. A file may also contain so-called private IFDs that are referenced from tag data and do not appear in the main list.

This class is not a committed part of the JAI API. It may be removed or changed in future releases of JAI.
See Also:   TIFFField
version:
   $Id: TIFFDirectory.java 496559 2007-01-16 01:10:29Z cam $



Field Summary
 longIFDOffset
     The offset of this IFD.
 MapfieldIndex
     A Hashtable indexing the fields by tag number.
 TIFFField[]fields
     An array of TIFFFields.
 booleanisBigEndian
     A boolean storing the endianness of the stream.
 longnextIFDOffset
     The offset of the next IFD.
 intnumEntries
     The number of entries in the IFD.

Constructor Summary
 TIFFDirectory()
     The default constructor.
public  TIFFDirectory(SeekableStream stream, int directory)
     Constructs a TIFFDirectory from a SeekableStream.
public  TIFFDirectory(SeekableStream stream, long ifd_offset, int directory)
     Constructs a TIFFDirectory by reading a SeekableStream.

Method Summary
public  TIFFFieldgetField(int tag)
     Returns the value of a given tag as a TIFFField, or null if the tag is not present.
public  bytegetFieldAsByte(int tag, int index)
     Returns the value of a particular index of a given tag as a byte.
public  bytegetFieldAsByte(int tag)
     Returns the value of index 0 of a given tag as a byte.
public  doublegetFieldAsDouble(int tag, int index)
     Returns the value of a particular index of a given tag as a double.
public  doublegetFieldAsDouble(int tag)
     Returns the value of index 0 of a given tag as a double.
public  floatgetFieldAsFloat(int tag, int index)
     Returns the value of a particular index of a given tag as a float.
public  floatgetFieldAsFloat(int tag)
     Returns the value of index 0 of a given tag as a float.
public  longgetFieldAsLong(int tag, int index)
     Returns the value of a particular index of a given tag as a long.
public  longgetFieldAsLong(int tag)
     Returns the value of index 0 of a given tag as a long.
public  TIFFField[]getFields()
     Returns an array of TIFFFields containing all the fields in this directory.
public  longgetIFDOffset()
     Returns the offset of the IFD corresponding to this TIFFDirectory.
public  longgetNextIFDOffset()
     Returns the offset of the next IFD after the IFD corresponding to this TIFFDirectory.
public static  intgetNumDirectories(SeekableStream stream)
     Returns the number of image directories (subimages) stored in a given TIFF file, represented by a SeekableStream.
public  intgetNumEntries()
     Returns the number of directory entries.
public  int[]getTags()
     Returns an ordered array of ints indicating the tag values.
public  booleanisBigEndian()
     Returns a boolean indicating whether the byte order used in the the TIFF file is big-endian.
public  booleanisTagPresent(int tag)
     Returns true if a tag appears in the directory.

Field Detail
IFDOffset
long IFDOffset(Code)
The offset of this IFD.



fieldIndex
Map fieldIndex(Code)
A Hashtable indexing the fields by tag number.



fields
TIFFField[] fields(Code)
An array of TIFFFields.



isBigEndian
boolean isBigEndian(Code)
A boolean storing the endianness of the stream.



nextIFDOffset
long nextIFDOffset(Code)
The offset of the next IFD.



numEntries
int numEntries(Code)
The number of entries in the IFD.




Constructor Detail
TIFFDirectory
TIFFDirectory()(Code)
The default constructor.



TIFFDirectory
public TIFFDirectory(SeekableStream stream, int directory) throws IOException(Code)
Constructs a TIFFDirectory from a SeekableStream. The directory parameter specifies which directory to read from the linked list present in the stream; directory 0 is normally read but it is possible to store multiple images in a single TIFF file by maintaing multiple directories.
Parameters:
  stream - a SeekableStream to read from.
Parameters:
  directory - the index of the directory to read.



TIFFDirectory
public TIFFDirectory(SeekableStream stream, long ifd_offset, int directory) throws IOException(Code)
Constructs a TIFFDirectory by reading a SeekableStream. The ifd_offset parameter specifies the stream offset from which to begin reading; this mechanism is sometimes used to store private IFDs within a TIFF file that are not part of the normal sequence of IFDs.
Parameters:
  stream - a SeekableStream to read from.
Parameters:
  ifd_offset - the long byte offset of the directory.
Parameters:
  directory - the index of the directory to read beyond theone at the current stream offset; zero indicates the IFDat the current offset.




Method Detail
getField
public TIFFField getField(int tag)(Code)
Returns the value of a given tag as a TIFFField, or null if the tag is not present.



getFieldAsByte
public byte getFieldAsByte(int tag, int index)(Code)
Returns the value of a particular index of a given tag as a byte. The caller is responsible for ensuring that the tag is present and has type TIFFField.TIFF_SBYTE, TIFF_BYTE, or TIFF_UNDEFINED.



getFieldAsByte
public byte getFieldAsByte(int tag)(Code)
Returns the value of index 0 of a given tag as a byte. The caller is responsible for ensuring that the tag is present and has type TIFFField.TIFF_SBYTE, TIFF_BYTE, or TIFF_UNDEFINED.



getFieldAsDouble
public double getFieldAsDouble(int tag, int index)(Code)
Returns the value of a particular index of a given tag as a double. The caller is responsible for ensuring that the tag is present and has numeric type (all but TIFF_UNDEFINED and TIFF_ASCII).



getFieldAsDouble
public double getFieldAsDouble(int tag)(Code)
Returns the value of index 0 of a given tag as a double. The caller is responsible for ensuring that the tag is present and has numeric type (all but TIFF_UNDEFINED and TIFF_ASCII).



getFieldAsFloat
public float getFieldAsFloat(int tag, int index)(Code)
Returns the value of a particular index of a given tag as a float. The caller is responsible for ensuring that the tag is present and has numeric type (all but TIFF_UNDEFINED and TIFF_ASCII).



getFieldAsFloat
public float getFieldAsFloat(int tag)(Code)
Returns the value of index 0 of a given tag as a float. The caller is responsible for ensuring that the tag is present and has numeric type (all but TIFF_UNDEFINED and TIFF_ASCII).



getFieldAsLong
public long getFieldAsLong(int tag, int index)(Code)
Returns the value of a particular index of a given tag as a long. The caller is responsible for ensuring that the tag is present and has type TIFF_BYTE, TIFF_SBYTE, TIFF_UNDEFINED, TIFF_SHORT, TIFF_SSHORT, TIFF_SLONG or TIFF_LONG.



getFieldAsLong
public long getFieldAsLong(int tag)(Code)
Returns the value of index 0 of a given tag as a long. The caller is responsible for ensuring that the tag is present and has type TIFF_BYTE, TIFF_SBYTE, TIFF_UNDEFINED, TIFF_SHORT, TIFF_SSHORT, TIFF_SLONG or TIFF_LONG.



getFields
public TIFFField[] getFields()(Code)
Returns an array of TIFFFields containing all the fields in this directory.



getIFDOffset
public long getIFDOffset()(Code)
Returns the offset of the IFD corresponding to this TIFFDirectory.



getNextIFDOffset
public long getNextIFDOffset()(Code)
Returns the offset of the next IFD after the IFD corresponding to this TIFFDirectory.



getNumDirectories
public static int getNumDirectories(SeekableStream stream) throws IOException(Code)
Returns the number of image directories (subimages) stored in a given TIFF file, represented by a SeekableStream.



getNumEntries
public int getNumEntries()(Code)
Returns the number of directory entries.



getTags
public int[] getTags()(Code)
Returns an ordered array of ints indicating the tag values.



isBigEndian
public boolean isBigEndian()(Code)
Returns a boolean indicating whether the byte order used in the the TIFF file is big-endian. That is, whether the byte order is from the most significant to the least significant.



isTagPresent
public boolean isTagPresent(int tag)(Code)
Returns true if a tag appears in the directory.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.