|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.coverage.grid.stream.IOExchange
This class is used to exchange between different input and output sources and destinations If a format, for example arcgrid, needs a Reader object then IOExchange will create one from the Source object
Method Summary | |
static int |
determineSourceFormat(java.lang.Object arg0)
When implemented this method will determine the format of a source object |
java.io.PrintWriter |
getGZIPPrintWriter(java.lang.Object destination)
Returns a PrintWriter that wraps a GZIPOutputStream. |
java.io.Reader |
getGZIPReader(java.lang.Object source)
Returns a Reader that wraps a GZIPInputStream. |
static IOExchange |
getIOExchange()
Factory method for creating a new IOExchange |
java.io.PrintWriter |
getPrintWriter(java.lang.Object destination)
Takes a destination object and creates a PrintWriter from it |
java.io.Reader |
getReader(java.lang.Object source)
Uses the source object to create a Reader object for client |
java.io.Writer |
getWriter(java.lang.Object destination)
Takes a destination object and converts it to it's appropriate subclass of Writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static IOExchange getIOExchange()
public java.io.Reader getReader(java.lang.Object source) throws java.io.IOException
source
- An object that identifies an input Current Implementation
accepts: Reader, URL, String, File, InputStream
java.io.IOException
- If Source object cannot be identified or if an unexpected
problem occurs.public java.io.Reader getGZIPReader(java.lang.Object source) throws java.io.IOException
source
- An object that identifies an input Current Implementation.
accepts: Reader, URL, String, File, InputStream Note: if
source is a reader it MUST already wrap a GZIPInputStream.
java.io.IOException
- if the destination cannot be converted to a Writerpublic java.io.Writer getWriter(java.lang.Object destination) throws java.io.IOException
Takes the destination object and casts it to one of: Writer (Returns Writer) OutputStream (Returns OutputStreamWriter) String (Returns OutputStreamWriter) URL (Returns OutputStreamWriter) File (Returns FileWriter) It then constructs a new Writer out of the destination and returns it.
destination
- the destination object to be converted
java.io.IOException
- if the destination cannot be converted to a Writerpublic java.io.PrintWriter getPrintWriter(java.lang.Object destination) throws java.io.IOException
destination
- the destination object to be converted
java.io.IOException
- if the destination cannot be converted to a Writerpublic java.io.PrintWriter getGZIPPrintWriter(java.lang.Object destination) throws java.io.IOException
java.io.IOException
- if the destination cannot be converted to a Writerpublic static int determineSourceFormat(java.lang.Object arg0)
arg0
- The source object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |