org.directwebremoting.io
Interface OutputStreamLoader

All Known Implementing Classes:
InputStreamFactoryOutputStreamLoader

public interface OutputStreamLoader

This class gives some lifecycle to an OutputStream. 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 load(OutputStream) 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.

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

Method Summary
 void close()
          This method indicates that whether or not this resource has been read, it is not longer required.
 void load(java.io.OutputStream out)
          Write all the data to the given output stream.
 

Method Detail

load

void load(java.io.OutputStream out)
          throws java.io.IOException
Write all the data to the given output stream.

Throws:
java.io.IOException

close

void close()
           throws java.io.IOException
This method indicates that whether or not this resource has been read, it is not longer required. Must be called by whatever calls load(OutputStream) when it has finished reading from the stream, or when it has decided that it never will call load(OutputStream).

Throws:
java.io.IOException

Copyright 2008