Esri Geoportal Server
1.0

com.esri.gpt.framework.http
Class IOUtility

java.lang.Object
  extended by com.esri.gpt.framework.http.IOUtility

public class IOUtility
extends Object

Base class for providers of HTTP request content and handlers of HTTP response content.


Constructor Summary
IOUtility()
          Default constructor.
 
Method Summary
 void executeIO(InputStream source, OutputStream destination)
          Executes stream to stream I/O.
 void executeIO(InputStream source, String charset, Writer destination)
          Executes stream to character I/O.
 void executeIO(Reader source, String charset, OutputStream destination)
          Executes character to stream I/O.
 void executeIO(Reader source, Writer destination)
          Executes character to character I/O.
 int getInitialBufferlength()
          Gets the initial buffer length (in bytes) for streamed content.
 String getLoggableContent()
          Gets content associated with the HTTP request/response suitable for logging.
 void setInitialBufferLength(int length)
          Sets the initial buffer length (in bytes) for streamed content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOUtility

public IOUtility()
Default constructor.

Method Detail

getInitialBufferlength

public int getInitialBufferlength()
Gets the initial buffer length (in bytes) for streamed content.
Default = 4096 bytes

Returns:
the initial buffer length (in bytes)

setInitialBufferLength

public void setInitialBufferLength(int length)
Sets the initial buffer length (in bytes) for streamed content.
Default = 4096 bytes

Parameters:
length - the initial buffer length (in bytes)

getLoggableContent

public String getLoggableContent()
Gets content associated with the HTTP request/response suitable for logging.
The default implementation returns null.

Returns:
the loggable string (null if not applicable)

executeIO

public void executeIO(InputStream source,
                      OutputStream destination)
               throws IOException
Executes stream to stream I/O.

Parameters:
source - the input stream from which data will be read
destination - the output stream to which data will be written
Throws:
IOException - if an exception occurs

executeIO

public void executeIO(Reader source,
                      Writer destination)
               throws IOException
Executes character to character I/O.

Parameters:
source - the character reader from which data will be read
destination - the character writer the to which data will be written
Throws:
IOException - if an exception occurs

executeIO

public void executeIO(InputStream source,
                      String charset,
                      Writer destination)
               throws IOException
Executes stream to character I/O.

Parameters:
source - the character reader from which data will be read
destination - the character writer the to which data will be written
Throws:
IOException - if an exception occurs

executeIO

public void executeIO(Reader source,
                      String charset,
                      OutputStream destination)
               throws IOException
Executes character to stream I/O.

Parameters:
source - the character reader from which data will be read
destination - the output stream to which data will be written
Throws:
IOException - if an exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.