org.directwebremoting.extend
Class SimpleInputStreamFactory

java.lang.Object
  extended by org.directwebremoting.extend.SimpleInputStreamFactory
All Implemented Interfaces:
InputStreamFactory

public class SimpleInputStreamFactory
extends java.lang.Object
implements InputStreamFactory

SimpleInputStreamFactory is just an InputStreamFactory that holds an InputStream and can close it at the right time (if required)

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
SimpleInputStreamFactory(java.io.InputStream in)
           
SimpleInputStreamFactory(java.io.InputStream in, boolean autoClose)
           
 
Method Summary
 void close()
          Whether or not this resource has been read from, this should be called to indicate that the resources are no longer required.
 java.io.InputStream getInputStream()
          Gets an input stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleInputStreamFactory

public SimpleInputStreamFactory(java.io.InputStream in)

SimpleInputStreamFactory

public SimpleInputStreamFactory(java.io.InputStream in,
                                boolean autoClose)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: InputStreamFactory
Gets an input stream. This function should be called only once.

Specified by:
getInputStream in interface InputStreamFactory
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Description copied from interface: InputStreamFactory
Whether or not this resource has been read from, this should be called to indicate that the resources are no longer required.

Specified by:
close in interface InputStreamFactory
Throws:
java.io.IOException

Copyright 2008