Java Doc for TileDecoderRegistry.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » registry » 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 » javax.media.jai.registry 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.registry.TileDecoderRegistry

TileDecoderRegistry
final public class TileDecoderRegistry (Code)
Utility class to provide type-safe interaction with the OperationRegistry for TileDecoderFactory objects. If the OperationRegistry specified as an argument to the methods in this class is null, then JAI.getOperationRegistry() will be used.
since:
   JAI 1.1




Method Summary
public static  voidclearPreferences(OperationRegistry registry, String formatName, String productName)
     Clears all preferences set for registered TileDecoderFactorys under the given formatName and productName in the given OperationRegistry.
Parameters:
  registry - The OperationRegistry to clearpreferences from.
public static  TileDecodercreate(OperationRegistry registry, String formatName, InputStream input, TileCodecParameterList paramList)
     Creates a TileDecoder for the specified format that is capable of handling the supplied arguments.
public static  Rasterdecode(OperationRegistry registry, String formatName, InputStream input, TileCodecParameterList param)
     Decodes the data from the specified InputStream using the given formatName and TileCodecParameterList.
public static  Rasterdecode(OperationRegistry registry, String formatName, InputStream input, TileCodecParameterList param, Point location)
     Decodes the data from the specified InputStream using the given formatName and TileCodecParameterList. The TileDecoder which performs the decoding is the one created from the most prefered TileDecoderFactory whose create method returns a non-null result.
public static  TileDecoderFactoryget(OperationRegistry registry, String formatName)
     Returns the the most preferred TileDecoderFactory object registered against the given format name.
public static  IteratorgetIterator(OperationRegistry registry, String formatName)
     Returns an Iterator over all TileDecoderFactory objects registered under the given format name over all products.
public static  ListgetOrderedList(OperationRegistry registry, String formatName, String productName)
     Returns a List of the TileDecoderFactorys registered in the given OperationRegistry under the given formatName and productName, in an ordering that satisfies all of the pairwise preferences that have been set.
public static  voidregister(OperationRegistry registry, String formatName, String productName, TileDecoderFactory tdf)
     Registers the given TileDecoderFactory with the given OperationRegistry under the given formatName and productName.
Parameters:
  registry - The OperationRegistry to register the TileDecoderFactory with.
public static  voidsetPreference(OperationRegistry registry, String formatName, String productName, TileDecoderFactory preferredTDF, TileDecoderFactory otherTDF)
     Sets a preference between the given two TileDecoderFactory objects in the given OperationRegistry under the given formatName and productName.
Parameters:
  registry - The OperationRegistry to setpreferences on.
public static  voidunregister(OperationRegistry registry, String formatName, String productName, TileDecoderFactory tdf)
     Unregisters the given TileDecoderFactory previously registered under the given formatName and productName in the given OperationRegistry.
Parameters:
  registry - The OperationRegistry to unregister the TileDecoderFactory from.
public static  voidunsetPreference(OperationRegistry registry, String formatName, String productName, TileDecoderFactory preferredTDF, TileDecoderFactory otherTDF)
     Unsets a preference previously set amongst the given two TileDecoderFactory objects in the given OperationRegistry under the given formatName and productName.
Parameters:
  registry - The OperationRegistry to unsetpreferences on.



Method Detail
clearPreferences
public static void clearPreferences(OperationRegistry registry, String formatName, String productName)(Code)
Clears all preferences set for registered TileDecoderFactorys under the given formatName and productName in the given OperationRegistry.
Parameters:
  registry - The OperationRegistry to clearpreferences from. If this isnull, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The format name to clear preferences under.
Parameters:
  productName - The productName to clear preferences under.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IllegalArgumentException - if productName is null.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName.



create
public static TileDecoder create(OperationRegistry registry, String formatName, InputStream input, TileCodecParameterList paramList)(Code)
Creates a TileDecoder for the specified format that is capable of handling the supplied arguments.

The preferences set amongst the TileDecoderFactory objects registered with the OperationRegistry are used to select the most prefered TileDecoderFactory whose createDecoder() method returns a non-null value.

In order to do the decoding correctly, the caller should retrieve the TileCodecDescriptor associated with the returned TileDecoder from the OperationRegistry and use it's includesLocationInfo() method's return value to decide which of the two versions of the decode() method on the returned TileDecoder should be used.

Since this class is a simple type-safe wrapper around OperationRegistry's type-unsafe methods, no additional argument validation is performed in this method. Thus errors/exceptions may occur if incorrect values are provided for the input arguments.

Exceptions thrown by the TileDecoderFactorys used to create the TileDecoder will be caught by this method and will not be propagated.
Parameters:
  registry - The OperationRegistry to use to createthe TileDecoder. If this is null, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The format for which the TileDecoder isto be created.
Parameters:
  input - The InputStream to read encoded data from.
Parameters:
  paramList - The object containing the tile decoding parameters.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName.




decode
public static Raster decode(OperationRegistry registry, String formatName, InputStream input, TileCodecParameterList param) throws IOException(Code)
Decodes the data from the specified InputStream using the given formatName and TileCodecParameterList. The TileDecoder which performs the decoding is the one created from the most prefered TileDecoderFactory whose create method returns a non-null result.

An IllegalArgumentException will be thrown if the specified format's TileCodecDescriptor's includesLocationInfo() method returns false, as no location information is provided in this method.

If the specified TileCodecParameterList is null, the default TileCodecParameterList retrieved by the specific TileDecoder.getDefaultParameters() method for the "tileDecoder" registry mode will be used.

For the specified format, if the associated TileCodecDescriptor's includesSampleModelInfo() method returns false, and either the specified TileCodecParameterList is null or if it doesn't contain a non-value for the "sampleModel" parameter, an IllegalArgumentException will be thrown.

If there are no TileDecoder objects that can decode the specified InputStream according to the decoding parameters supplied, null will be returned from this method.

If multiple tiles are to be decoded from the same InputStream in the same format using the same TileCodecParameterList, it is advisable to create a TileDecoder object and use the decode() method on this decoder for each tile, thus creating and using only a single TileDecoder object. The decode() method on TileDecoderRegistry creates a new TileDecoder object each time it is called.

Since this class is a simple type-safe wrapper around OperationRegistry's type-unsafe methods, no additional argument validation is performed in this method. Thus errors/exceptions may occur if incorrect values are provided for the input arguments.

Exceptions thrown by the TileDecoderFactorys used to create the TileDecoder will be caught by this method and will not be propagated.
Parameters:
  registry - The OperationRegistry to use to createthe TileDecoder. If this is null, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The format name associated with the decoder.
Parameters:
  input - The InputStream containing the data to be decoded.
Parameters:
  param - The TileCodecParameterList to be used.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IOException - if an I/O error occurs while reading from theassociated InputStream.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName. The associated TileDecoder, or null.




decode
public static Raster decode(OperationRegistry registry, String formatName, InputStream input, TileCodecParameterList param, Point location) throws IOException(Code)
Decodes the data from the specified InputStream using the given formatName and TileCodecParameterList. The TileDecoder which performs the decoding is the one created from the most prefered TileDecoderFactory whose create method returns a non-null result. If there are no TileDecoder objects that can decode the specified InputStream according to the decoding parameters supplied, null will be returned from this method.

If the specified TileCodecParameterList is null, the default TileCodecParameterList retrieved by the specific TileDecoder.getDefaultParameters() method will be used.

If the specified location is null, and the associated TileCodecDescriptor's includesLocationInfo() method returns false, IllegalArgumentException will be thrown.

For the specified format, if the associated TileCodecDescriptor's includesSampleModelInfo() method returns false, and if the specified TileCodecParameterList is null or if it doesn't contain a non-value for the "sampleModel" parameter, an IllegalArgumentException will be thrown.

If multiple tiles are to be decoded from the same InputStream in the same format using the same TileCodecParameterList, it is advisable to create a TileDecoder object and use the decode() method on this decoder for each tile, thus creating and using only a single TileDecoder object. The decode() method on TileDecoderRegistry creates a new TileDecoder object each time it is called.

Since this class is a simple type-safe wrapper around OperationRegistry's type-unsafe methods, no additional argument validation is performed in this method. Thus errors/exceptions may occur if incorrect values are provided for the input arguments.

Exceptions thrown by the TileDecoderFactorys used to create the TileDecoder will be caught by this method and will not be propagated.
Parameters:
  registry - The OperationRegistry to use to createthe TileDecoder. If this is null, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The format name associated with the decoder.
Parameters:
  input - The InputStream containing the data tobe decoded.
Parameters:
  param - The TileCodecParameterList to be used.
Parameters:
  location - The Point specifying the upper leftcorner of the Raster.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IOException - if an inout/output error occurs while reading fromthe associated InputStream or during decoding.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName. The associated TileDecoder, or null.




get
public static TileDecoderFactory get(OperationRegistry registry, String formatName)(Code)
Returns the the most preferred TileDecoderFactory object registered against the given format name. This method will return the first TileDecoderFactory that would be encountered by the Iterator returned by the getIterator() method.
Parameters:
  registry - The OperationRegistry to use.If this is null, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The format name as a String a registered TileDecoderFactory object
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered againstthe formatName



getIterator
public static Iterator getIterator(OperationRegistry registry, String formatName)(Code)
Returns an Iterator over all TileDecoderFactory objects registered under the given format name over all products. The order of the TileDecoderFactory objects in the iteration will be according to the pairwise preferences among products and TileDecoderFactory objects within a product. The remove() method of the Iterator may not be implemented.
Parameters:
  registry - The OperationRegistry to use. If this is null, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The format name. an Iterator over TileDecoderFactoryobjects.
throws:
  IllegalArgumentException - if formatName is null
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against thegiven formatName.



getOrderedList
public static List getOrderedList(OperationRegistry registry, String formatName, String productName)(Code)
Returns a List of the TileDecoderFactorys registered in the given OperationRegistry under the given formatName and productName, in an ordering that satisfies all of the pairwise preferences that have been set. Returns null if cycles exist.
Parameters:
  registry - The OperationRegistry to clearpreferences from. If this isnull, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The format name to clear preferences under.
Parameters:
  productName - The productName to clear preferences under.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IllegalArgumentException - if productName is null.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName.



register
public static void register(OperationRegistry registry, String formatName, String productName, TileDecoderFactory tdf)(Code)
Registers the given TileDecoderFactory with the given OperationRegistry under the given formatName and productName.
Parameters:
  registry - The OperationRegistry to register the TileDecoderFactory with. If this isnull, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The formatName to register the TileDecoderFactory under.
Parameters:
  productName - The productName to register the TileDecoderFactory under.
Parameters:
  tdf - The TileDecoderFactory to register.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IllegalArgumentException - if productName is null.
throws:
  IllegalArgumentException - if tdf is null.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName



setPreference
public static void setPreference(OperationRegistry registry, String formatName, String productName, TileDecoderFactory preferredTDF, TileDecoderFactory otherTDF)(Code)
Sets a preference between the given two TileDecoderFactory objects in the given OperationRegistry under the given formatName and productName.
Parameters:
  registry - The OperationRegistry to setpreferences on. If this isnull, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The formatName of the twoTileDecoderFactorys.
Parameters:
  productName - The productName of the twoTileDecoderFactorys.
Parameters:
  preferredTDF - The preferred TileDecoderFactory.
Parameters:
  otherTDF - The other TileDecoderFactory.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IllegalArgumentException - if productName is null.
throws:
  IllegalArgumentException - if preferredTDF is null.
throws:
  IllegalArgumentException - if otherTDF is null.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName
throws:
  IllegalArgumentException - if either of the two tdf's was not previously registered against the given formatName and productName.



unregister
public static void unregister(OperationRegistry registry, String formatName, String productName, TileDecoderFactory tdf)(Code)
Unregisters the given TileDecoderFactory previously registered under the given formatName and productName in the given OperationRegistry.
Parameters:
  registry - The OperationRegistry to unregister the TileDecoderFactory from. If this isnull, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The formatName to unregister theTileDecoderFactory from.
Parameters:
  productName - The productName to unregister theTileDecoderFactory from.
Parameters:
  tdf - The TileDecoderFactory to unregister.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IllegalArgumentException - if productName is null.
throws:
  IllegalArgumentException - if tdf is null.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName
throws:
  IllegalArgumentException - if the tdf was not previouslyregistered against the given formatName and productName.



unsetPreference
public static void unsetPreference(OperationRegistry registry, String formatName, String productName, TileDecoderFactory preferredTDF, TileDecoderFactory otherTDF)(Code)
Unsets a preference previously set amongst the given two TileDecoderFactory objects in the given OperationRegistry under the given formatName and productName.
Parameters:
  registry - The OperationRegistry to unsetpreferences on. If this isnull, then JAI.getDefaultInstance().getOperationRegistry()will be used.
Parameters:
  formatName - The formatName of the twoTileDecoderFactorys.
Parameters:
  productName - The productName of the twoTileDecoderFactorys.
Parameters:
  preferredTDF - The preferred TileDecoderFactory.
Parameters:
  otherTDF - The other TileDecoderFactory.
throws:
  IllegalArgumentException - if formatName is null.
throws:
  IllegalArgumentException - if productName is null.
throws:
  IllegalArgumentException - if preferredTDF is null.
throws:
  IllegalArgumentException - if otherTDF is null.
throws:
  IllegalArgumentException - if there is no TileCodecDescriptor registered against the given formatName
throws:
  IllegalArgumentException - if either of the two tdf's wasnot previously registered against the given formatName and productName.



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.