de.infinityloop.util.inout
Class InputProxy

java.lang.Object
  extended by org.xml.sax.InputSource
      extended by de.infinityloop.util.inout.InputProxy

public class InputProxy
extends org.xml.sax.InputSource

A generalized input source object to pass around in the application. For simplicity, this extends org.xml.sax.InputSource .


Constructor Summary
InputProxy()
           
InputProxy(DiskFile file)
          Constructor for InputProxy with a DiskFile as parameter.
InputProxy(DiskFile file, boolean doThrow)
          Constructor for InputProxy with a DiskFile as parameter.
InputProxy(java.io.InputStream s)
           
InputProxy(java.io.InputStream s, java.lang.String systemId)
           
InputProxy(java.io.Reader r)
           
InputProxy(java.lang.String sysId)
          Create an input proxy object from a variety of sources.
 
Method Summary
 void close()
          Closes the input bytestream/characterstream/file.
 java.io.InputStream getByteStream()
          Returns the InputStream.
 java.io.Reader getCharacterStream()
          Returns the Reader.
 java.io.Reader getCharacterStream(java.lang.String enc)
          Returns a reader with the specified encoding
 java.lang.String toString()
          string representation of object
 
Methods inherited from class org.xml.sax.InputSource
getEncoding, getPublicId, getSystemId, setByteStream, setCharacterStream, setEncoding, setPublicId, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputProxy

public InputProxy(DiskFile file)
           throws java.lang.Exception
Constructor for InputProxy with a DiskFile as parameter.

Throws:
java.lang.Exception

InputProxy

public InputProxy(DiskFile file,
                  boolean doThrow)
           throws java.lang.Exception
Constructor for InputProxy with a DiskFile as parameter.

Throws:
java.lang.Exception

InputProxy

public InputProxy()

InputProxy

public InputProxy(java.io.InputStream s)

InputProxy

public InputProxy(java.io.InputStream s,
                  java.lang.String systemId)

InputProxy

public InputProxy(java.io.Reader r)

InputProxy

public InputProxy(java.lang.String sysId)
           throws ILException
Create an input proxy object from a variety of sources. Currently, local file specifications, http/https/file URLs and a proprietary jar: syntax are supported.

Parameters:
sysId -
Throws:
ILException
Method Detail

getByteStream

public java.io.InputStream getByteStream()
Returns the InputStream. If that does not exist, we create one from the input stream.

Overrides:
getByteStream in class org.xml.sax.InputSource

getCharacterStream

public java.io.Reader getCharacterStream()
Returns the Reader. If that does not exist, we create one from the input stream.

Overrides:
getCharacterStream in class org.xml.sax.InputSource

getCharacterStream

public java.io.Reader getCharacterStream(java.lang.String enc)
                                  throws java.io.UnsupportedEncodingException
Returns a reader with the specified encoding

Throws:
java.io.UnsupportedEncodingException

close

public void close()
Closes the input bytestream/characterstream/file.


toString

public java.lang.String toString()
string representation of object

Overrides:
toString in class java.lang.Object