org.directwebremoting.io
Interface InputStreamFactory

All Known Implementing Classes:
OutputStreamLoaderInputStreamFactory, SimpleInputStreamFactory

public interface InputStreamFactory

This class gives some lifecycle to an InputStream. There may be times (particularly with downloading files to browsers) when it is not clear if the data will ever be read. A call to getInputStream() is a signal that we really to want data now and that if any processing is needed, if should be done. A call to close() is a signal that whether or not getInputStream was called, the data is no longer required. SimpleInputStreamFactory.

Author:
Lance Semmens [uklance at gmail dot com]
See Also:
SimpleInputStreamFactory

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.
 

Method Detail

getInputStream

java.io.InputStream getInputStream()
                                   throws java.io.IOException
Gets an input stream. This function should be called only once.

Throws:
java.io.IOException

close

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

Throws:
java.io.IOException

Copyright 2008