Java Doc for TIFFDirectory.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » com » sun » media » imageio » plugins » 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 » 6.0 JDK Modules » Java Advanced Imaging » com.sun.media.imageio.plugins.tiff 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.media.imageio.plugins.tiff.TIFFDirectory

All known Subclasses:   com.sun.media.imageioimpl.plugins.tiff.TIFFIFD,
TIFFDirectory
public class TIFFDirectory implements Cloneable(Code)
A convenience class for simplifying interaction with TIFF native image metadata. A TIFF image metadata tree represents an Image File Directory (IFD) from a TIFF 6.0 stream. An IFD consists of a number of IFD Entries each of which associates an identifying tag number with a compatible value. A TIFFDirectory instance corresponds to an IFD and contains a set of TIFFField s each of which corresponds to an IFD Entry in the IFD.

When reading, a TIFFDirectory may be created by passing the value returned by javax.imageio.ImageReader.getImageMetadataImageReader.getImageMetadata() to TIFFDirectory.createFromMetadatacreateFromMetadata() . The TIFFField s in the directory may then be obtained using the accessor methods provided in this class.

When writing, an IIOMetadata object for use by one of the write() methods of javax.imageio.ImageWriter may be created from a TIFFDirectory by TIFFDirectory.getAsMetadata() . The TIFFDirectory itself may be created by construction or from the IIOMetadata object returned by javax.imageio.ImageWriter.getDefaultImageMetadataImageWriter.getDefaultImageMetadata() . The TIFFFields in the directory may be set using the mutator methods provided in this class.

A TIFFDirectory is aware of the tag numbers in the group of TIFFTagSet s associated with it. When a TIFFDirectory is created from a native image metadata object, these tag sets are derived from the tagSets attribute of the TIFFIFD node.

A TIFFDirectory might also have a parent TIFFTag . This will occur if the directory represents an IFD other than the root IFD of the image. The parent tag is the tag of the IFD Entry which is a pointer to the IFD represented by this TIFFDirectory. The TIFFTag.isIFDPointer method of this parent TIFFTag must return true. When a TIFFDirectory is created from a native image metadata object, the parent tag set is set from the parentTagName attribute of the corresponding TIFFIFD node. Note that a TIFFDirectory instance which has a non-null parent tag will be contained in the data field of a TIFFField instance which has a tag field equal to the contained directory's parent tag.

As an example consider an EXIF image. The TIFFDirectory instance corresponding to the EXIF IFD in the EXIF stream would have parent tag EXIFParentTIFFTagSet.TAG_EXIF_IFD_POINTER TAG_EXIF_IFD_POINTER and would include EXIFTIFFTagSet in its group of known tag sets. The TIFFDirectory corresponding to this EXIF IFD will be contained in the data field of a TIFFField which will in turn be contained in the TIFFDirectory corresponding to the primary IFD of the EXIF image which will itself have a null-valued parent tag.

Note that this implementation is not synchronized. If multiple threads use a TIFFDirectory instance concurrently, and at least one of the threads modifies the directory, for example, by adding or removing TIFFFields or TIFFTagSets, it must be synchronized externally.


See Also:   IIOMetadata
See Also:   TIFFField
See Also:   TIFFTag
See Also:   TIFFTagSet
since:
   1.1-beta



Constructor Summary
public  TIFFDirectory(TIFFTagSet[] tagSets, TIFFTag parentTag)
     Constructs a TIFFDirectory which is aware of a given group of TIFFTagSet s.

Method Summary
public  voidaddTIFFField(TIFFField f)
     Adds a TIFF field to the directory.
public  voidaddTagSet(TIFFTagSet tagSet)
     Adds an element to the group of TIFFTagSet s of which this directory is aware.
public  Objectclone()
     Clones the directory and all the fields contained therein.
public  booleancontainsTIFFField(int tagNumber)
     Determines whether a TIFF field with the given tag number is contained in this directory.
public static  TIFFDirectorycreateFromMetadata(IIOMetadata tiffImageMetadata)
     Creates a TIFFDirectory instance from the contents of an image metadata object.
public  IIOMetadatagetAsMetadata()
     Converts the directory to a metadata object.
public  intgetNumTIFFFields()
     Returns the number of TIFFField s in this directory.
public  TIFFTaggetParentTag()
     Returns the parent TIFFTag of this directory if one has been defined or null otherwise.
public  TIFFFieldgetTIFFField(int tagNumber)
     Retrieves a TIFF field from the directory.
Parameters:
  tagNumber - The tag number of the tag associated with the field.
public  TIFFField[]getTIFFFields()
     Retrieves all TIFF fields from the directory.
public  TIFFTaggetTag(int tagNumber)
     Returns the TIFFTag which has tag number equal to tagNumber or null if no such tag exists in the TIFFTagSet s associated with this directory.
Parameters:
  tagNumber - The tag number of interest.
public  TIFFTagSet[]getTagSets()
     Returns the TIFFTagSet s of which this directory is aware.
public  voidremoveTIFFField(int tagNumber)
     Removes a TIFF field from the directory.
public  voidremoveTIFFFields()
     Removes all TIFF fields from the directory.
public  voidremoveTagSet(TIFFTagSet tagSet)
     Removes an element from the group of TIFFTagSet s of which this directory is aware.


Constructor Detail
TIFFDirectory
public TIFFDirectory(TIFFTagSet[] tagSets, TIFFTag parentTag)(Code)
Constructs a TIFFDirectory which is aware of a given group of TIFFTagSet s. An optional parent TIFFTag may also be specified.
Parameters:
  tagSets - The TIFFTagSets associated with thisdirectory.
Parameters:
  parentTag - The parent TIFFTag of this directory;may be null.
throws:
  IllegalArgumentException - if tagSets isnull.




Method Detail
addTIFFField
public void addTIFFField(TIFFField f)(Code)
Adds a TIFF field to the directory.
Parameters:
  f - The field to add.
throws:
  IllegalArgumentException - if f is null.



addTagSet
public void addTagSet(TIFFTagSet tagSet)(Code)
Adds an element to the group of TIFFTagSet s of which this directory is aware.
Parameters:
  tagSet - The TIFFTagSet to add.
throws:
  IllegalArgumentException - if tagSet isnull.



clone
public Object clone()(Code)
Clones the directory and all the fields contained therein. A clone of this TIFFDirectory.



containsTIFFField
public boolean containsTIFFField(int tagNumber)(Code)
Determines whether a TIFF field with the given tag number is contained in this directory. Whether a TIFFTag with tag number equal totagNumber is present in this TIFFDirectory.



createFromMetadata
public static TIFFDirectory createFromMetadata(IIOMetadata tiffImageMetadata) throws IIOInvalidTreeException(Code)
Creates a TIFFDirectory instance from the contents of an image metadata object. The supplied object must support an image metadata format supported by the TIFF javax.imageio.ImageWriter plug-in. This will usually be either the TIFF native image metadata format com_sun_media_imageio_plugins_tiff_1.0 or the Java Image I/O standard metadata format javax_imageio_1.0.
Parameters:
  tiffImageMetadata - A metadata object which supports a compatibleimage metadata format. A TIFFDirectory populated from the contents ofthe supplied metadata object.
throws:
  IllegalArgumentException - if tiffImageMetadatais null.
throws:
  IllegalArgumentException - if tiffImageMetadatadoes not support a compatible image metadata format.
throws:
  IIOInvalidTreeException - if the supplied metadata objectcannot be parsed.



getAsMetadata
public IIOMetadata getAsMetadata()(Code)
Converts the directory to a metadata object. A metadata instance initialized from the contents of thisTIFFDirectory.



getNumTIFFFields
public int getNumTIFFFields()(Code)
Returns the number of TIFFField s in this directory. The number of TIFFFields in thisTIFFDirectory.



getParentTag
public TIFFTag getParentTag()(Code)
Returns the parent TIFFTag of this directory if one has been defined or null otherwise. The parent TIFFTag of thisTIFFDiectory or null.



getTIFFField
public TIFFField getTIFFField(int tagNumber)(Code)
Retrieves a TIFF field from the directory.
Parameters:
  tagNumber - The tag number of the tag associated with the field. A TIFFField with the requested tag number ofnull if no such field is present.



getTIFFFields
public TIFFField[] getTIFFFields()(Code)
Retrieves all TIFF fields from the directory. An array of all TIFF fields in order of numerically increasingtag number.



getTag
public TIFFTag getTag(int tagNumber)(Code)
Returns the TIFFTag which has tag number equal to tagNumber or null if no such tag exists in the TIFFTagSet s associated with this directory.
Parameters:
  tagNumber - The tag number of interest. The corresponding TIFFTag or null.



getTagSets
public TIFFTagSet[] getTagSets()(Code)
Returns the TIFFTagSet s of which this directory is aware. The TIFFTagSets associated with thisTIFFDirectory.



removeTIFFField
public void removeTIFFField(int tagNumber)(Code)
Removes a TIFF field from the directory.
Parameters:
  tagNumber - The tag number of the tag associated with the field.



removeTIFFFields
public void removeTIFFFields()(Code)
Removes all TIFF fields from the directory.



removeTagSet
public void removeTagSet(TIFFTagSet tagSet)(Code)
Removes an element from the group of TIFFTagSet s of which this directory is aware.
Parameters:
  tagSet - The TIFFTagSet to remove.
throws:
  IllegalArgumentException - if tagSet isnull.



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.