Public Member Functions |
| FilterOutputStream (OutputStream *outputStream, bool own=false) |
| Constructor, creates a wrapped output stream.
|
virtual | ~FilterOutputStream () |
virtual void | flush () |
| Flushes this stream by writing any buffered output to the underlying stream.- Exceptions
-
The default implementation of this method does nothing.
|
virtual void | close () |
| Closes this object and deallocates the appropriate resources.The object is generally no longer usable after calling close.- Exceptions
-
The default implementation of this method does nothing.
|
virtual std::string | toString () const |
| Output a String representation of this object.The default version of this method just prints the Class Name.- Returns
- a string representation of the object.
|
| OutputStream () |
virtual | ~OutputStream () |
virtual void | write (unsigned char c) |
| Writes a single byte to the output stream.
|
virtual void | write (const unsigned char *buffer, int size) |
| Writes an array of bytes to the output stream.
|
virtual void | write (const unsigned char *buffer, int size, int offset, int length) |
| Writes an array of bytes to the output stream in order starting at buffer[offset] and proceeding until the number of bytes specified by the length argument are written or an error occurs.
|
virtual void | lock () |
| Locks the object.
|
virtual bool | tryLock () |
| Attempts to Lock the object, if the lock is already held by another thread than this method returns false.
|
virtual void | unlock () |
| Unlocks the object.
|
virtual void | wait () |
| Waits on a signal from this object, which is generated by a call to Notify.
|
virtual void | wait (long long millisecs) |
| Waits on a signal from this object, which is generated by a call to Notify.
|
virtual void | wait (long long millisecs, int nanos) |
| Waits on a signal from this object, which is generated by a call to Notify.
|
virtual void | notify () |
| Signals a waiter on this object that it can now wake up and continue.
|
virtual void | notifyAll () |
| Signals the waiters on this object that it can now wake up and continue.
|
virtual | ~Closeable () |
virtual | ~Flushable () |
virtual | ~Synchronizable () |
This class is the superclass of all classes that filter output streams.
These streams sit on top of an already existing output stream (the underlying output stream) which it uses as its basic sink of data, but possibly transforming the data along the way or providing additional functionality.
The class FilterOutputStream itself simply overrides all methods of OutputStream with versions that pass all requests to the underlying output stream. Subclasses of FilterOutputStream may further override some of these methods as well as provide additional methods and fields.
Due to the lack of garbage collection in C++ a design decision was made to add a boolean parameter to the constructor indicating if the wrapped InputStream
is owned by this object. That way creation of the underlying stream can occur in a Java like way. Ex:
DataOutputStream os = new DataOutputStream( new OutputStream(), true )
virtual void decaf::io::FilterOutputStream::close |
( |
| ) |
|
|
virtual |
Closes this object and deallocates the appropriate resources.The object is generally no longer usable after calling close.
- Exceptions
-
The default implementation of this method does nothing.
The close method of FilterOutputStream calls its flush method, and then calls the close method of its underlying output stream.
Reimplemented from decaf::io::OutputStream.
Reimplemented in decaf::util::zip::DeflaterOutputStream.