Java Doc for StreamImageReader.java in  » GIS » GeoTools-2.4.1 » org » geotools » image » io » 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 » GIS » GeoTools 2.4.1 » org.geotools.image.io 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.image.io.GeographicImageReader
   org.geotools.image.io.StreamImageReader

All known Subclasses:   org.geotools.image.io.SimpleImageReader,  org.geotools.image.io.text.TextImageReader,  org.geotools.image.io.FileImageReader,
StreamImageReader
abstract public class StreamImageReader extends GeographicImageReader (Code)
Base class for simple image decoders. This class provides a StreamImageReader.getInputStream method, which returns the as an InputStream for convenience. Different kinds of input like or are automatically handled.
since:
   2.4
version:
   $Id: StreamImageReader.java 27908 2007-11-15 16:29:28Z desruisseaux $
author:
   Martin Desruisseaux

Inner Class :abstract public static class Spi extends ImageReaderSpi

Field Summary
protected  ObjectcloseOnReset
     The stream to on StreamImageReader.setInput(Object,boolean,boolean)setInput(...) , StreamImageReader.reset or StreamImageReader.dispose method invocation.

Constructor Summary
protected  StreamImageReader(ImageReaderSpi provider)
     Constructs a new image reader.

Method Summary
protected  voidclose()
     Closes the input stream created by StreamImageReader.getInputStream() .
public  voiddispose()
     Allows any resources held by this reader to be released.
protected  voidfinalize()
     Closes the streams.
protected  InputStreamgetInputStream()
     Returns the as an object. If the input is already an input stream, it is returned unchanged.
protected  longgetStreamLength()
     Returns the stream length in bytes, or -1 if unknown.
public  voidreset()
     Restores the StreamImageReader to its initial state.
public  voidsetInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
     Sets the input source to use.

Field Detail
closeOnReset
protected Object closeOnReset(Code)
The stream to on StreamImageReader.setInput(Object,boolean,boolean)setInput(...) , StreamImageReader.reset or StreamImageReader.dispose method invocation. This stream is typically an or a created by StreamImageReader.getInputStream or similar methods in subclasses.

This field is never equals to the user-specified , since the usual javax.imageio.ImageReader contract is to not close the user-provided stream. It is set to a non-null value only if a stream has been created from an other user object like File or URL .
See Also:   StreamImageReader.getInputStream
See Also:   org.geotools.image.io.text.TextImageReader.getReader
See Also:   StreamImageReader.closeCloseable





Constructor Detail
StreamImageReader
protected StreamImageReader(ImageReaderSpi provider)(Code)
Constructs a new image reader.
Parameters:
  provider - The ImageReaderSpi that is invoking this constructor,or null if none.




Method Detail
close
protected void close() throws IOException(Code)
Closes the input stream created by StreamImageReader.getInputStream() . This method does nothing if the input stream is the instance given by the user rather than a stream created by this class from a File or URL input.

This method is invoked automatically by StreamImageReader.setInput(Object,boolean,boolean)setInput(...) , StreamImageReader.reset , StreamImageReader.dispose or StreamImageReader.finalize methods and doesn't need to be invoked explicitly. It has protected access only in order to allow overriding by subclasses.
throws:
  IOException - if an error occured while closing the stream.
See Also:   StreamImageReader.closeOnReset




dispose
public void dispose()(Code)
Allows any resources held by this reader to be released. If an input stream were created by a previous call to StreamImageReader.getInputStream , it will be before to dispose this reader.



finalize
protected void finalize() throws Throwable(Code)
Closes the streams. This method is automatically invoked by the garbage collector.



getInputStream
protected InputStream getInputStream() throws IllegalStateException, IOException(Code)
Returns the as an object. If the input is already an input stream, it is returned unchanged. Otherwise this method creates a new (usually not ) from File , URL , URLConnection or ImageInputStream inputs.

This method creates a new only when first invoked. All subsequent calls will returns the same instance. Consequently, the returned stream should never be closed by the caller. It may be automatically when StreamImageReader.setInput setInput(...) , StreamImageReader.reset() or StreamImageReader.dispose() methods are invoked. StreamImageReader.getInput as an InputStream. This input stream is usuallynot .
throws:
  IllegalStateException - if the is not set.
throws:
  IOException - If the input stream can't be created for an other reason.
See Also:   StreamImageReader.getInput
See Also:   org.geotools.image.io.text.TextImageReader.getReader




getStreamLength
protected long getStreamLength() throws IOException(Code)
Returns the stream length in bytes, or -1 if unknown. This method checks the type and invokes one of File.length , ImageInputStream.length ou URLConnection.getContentLength method accordingly. The stream length, or -1 is unknown.
throws:
  IOException - if an I/O error occured.



reset
public void reset()(Code)
Restores the StreamImageReader to its initial state. If an input stream were created by a previous call to StreamImageReader.getInputStream , it will be before to reset this reader.



setInput
public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)(Code)
Sets the input source to use. Input may be one of the following object: File , URL , Reader (for ASCII data), InputStream or ImageInputStream . If input is null , then any currently set input source will be removed.
Parameters:
  input - The input object to use for future decoding.
Parameters:
  seekForwardOnly - If true , images and metadata may only be readin ascending order from this input source.
Parameters:
  ignoreMetadata - If true , metadata may be ignored during reads.
See Also:   StreamImageReader.getInput
See Also:   StreamImageReader.getInputStream



Fields inherited from org.geotools.image.io.GeographicImageReader
final static Logger LOGGER(Code)(Java Doc)

Methods inherited from org.geotools.image.io.GeographicImageReader
protected void checkBandIndex(int imageIndex, int bandIndex) throws IOException, IndexOutOfBoundsException(Code)(Java Doc)
protected void checkImageIndex(int imageIndex) throws IOException, IndexOutOfBoundsException(Code)(Java Doc)
void close() throws IOException(Code)(Java Doc)
protected boolean collapseNoDataValues(boolean isZeroValid, double[] nodataValues, int unusedSpace)(Code)(Java Doc)
protected static void flipVertically(ImageReadParam param, int srcHeight, Rectangle srcRegion)(Code)(Java Doc)
public ImageReadParam getDefaultReadParam()(Code)(Java Doc)
protected BufferedImage getDestination(int imageIndex, ImageReadParam parameters, int width, int height, SampleConverter[] converters) throws IOException(Code)(Java Doc)
final IndexedResourceBundle getErrorResources()(Code)(Java Doc)
public GeographicMetadata getGeographicMetadata(int imageIndex) throws IOException(Code)(Java Doc)
public IIOMetadata getImageMetadata(int imageIndex) throws IOException(Code)(Java Doc)
public Iterator getImageTypes(int imageIndex) throws IOException(Code)(Java Doc)
public int getNumBands(int imageIndex) throws IOException(Code)(Java Doc)
public int getNumImages(boolean allowSearch) throws IllegalStateException, IOException(Code)(Java Doc)
protected int getRawDataType(int imageIndex) throws IOException(Code)(Java Doc)
public ImageTypeSpecifier getRawImageType(int imageIndex) throws IOException(Code)(Java Doc)
protected ImageTypeSpecifier getRawImageType(int imageIndex, ImageReadParam parameters, SampleConverter[] converters) throws IOException(Code)(Java Doc)
public IIOMetadata getStreamMetadata() throws IOException(Code)(Java Doc)
public BufferedImage read(int imageIndex) throws IOException(Code)(Java Doc)
public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)(Code)(Java Doc)
public void warningOccurred(LogRecord record)(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.