|
activemq-cpp-3.9.5
|
Provides a FilterOutputStream instance that compresses the data before writing it to the wrapped OutputStream. More...
#include <src/main/decaf/util/zip/DeflaterOutputStream.h>

Public Member Functions | |||
| DeflaterOutputStream (decaf::io::OutputStream *outputStream, bool own=false) | |||
| Creates a new DeflateOutputStream with a Default Deflater and buffer size. | |||
| DeflaterOutputStream (decaf::io::OutputStream *outputStream, Deflater *deflater, bool own=false, bool ownDeflater=false) | |||
| Creates a new DeflateOutputStream with a user supplied Deflater and a default buffer size. | |||
| DeflaterOutputStream (decaf::io::OutputStream *outputStream, Deflater *deflater, int bufferSize, bool own=false, bool ownDeflater=false) | |||
| Creates a new DeflateOutputStream with a user supplied Deflater and specified buffer size. | |||
| virtual | ~DeflaterOutputStream () | ||
| virtual void | finish () | ||
| Finishes writing any remaining data to the wrapped OutputStream but does not close it upon completion. | |||
| virtual void | close () | ||
Closes this object and deallocates the appropriate resources.The object is generally no longer usable after calling close.
| |||
| Public Member Functions inherited from decaf::io::FilterOutputStream | |||
| 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.
| |||
| virtual std::string | toString () const | ||
Output a String representation of this object.The default version of this method just prints the Class Name.
| |||
| Public Member Functions inherited from decaf::io::OutputStream | |||
| 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. | |||
| Public Member Functions inherited from decaf::io::Closeable | |||
| virtual | ~Closeable () | ||
| Public Member Functions inherited from decaf::io::Flushable | |||
| virtual | ~Flushable () | ||
| Public Member Functions inherited from decaf::util::concurrent::Synchronizable | |||
| virtual | ~Synchronizable () | ||
Protected Member Functions | |
| virtual void | doWriteByte (unsigned char value) |
| virtual void | doWriteArrayBounded (const unsigned char *buffer, int size, int offset, int length) |
| virtual void | deflate () |
| Writes a buffers worth of compressed data to the wrapped OutputStream. | |
| Protected Member Functions inherited from decaf::io::FilterOutputStream | |
| virtual void | doWriteArray (const unsigned char *buffer, int size) |
| virtual bool | isClosed () const |
Protected Attributes | |
| Deflater * | deflater |
| The Deflater for this stream. | |
| std::vector< unsigned char > | buf |
| The Buffer to use for. | |
| bool | ownDeflater |
| bool | isDone |
| Protected Attributes inherited from decaf::io::FilterOutputStream | |
| OutputStream * | outputStream |
| bool | own |
| volatile bool | closed |
Static Protected Attributes | |
| static const std::size_t | DEFAULT_BUFFER_SIZE |
Provides a FilterOutputStream instance that compresses the data before writing it to the wrapped OutputStream.
| decaf::util::zip::DeflaterOutputStream::DeflaterOutputStream | ( | decaf::io::OutputStream * | outputStream, |
| bool | own = false ) |
Creates a new DeflateOutputStream with a Default Deflater and buffer size.
| outputStream | The OutputStream instance to wrap. |
| own | Should this filter take ownership of the OutputStream pointer (default is false). |
References decaf::io::FilterOutputStream::outputStream, and decaf::io::FilterOutputStream::own.
| decaf::util::zip::DeflaterOutputStream::DeflaterOutputStream | ( | decaf::io::OutputStream * | outputStream, |
| Deflater * | deflater, | ||
| bool | own = false, | ||
| bool | ownDeflater = false ) |
Creates a new DeflateOutputStream with a user supplied Deflater and a default buffer size.
When the user supplied a Deflater instance the DeflaterOutpotStream does not take ownership of the Deflater pointer unless the ownDeflater parameter is set to true, the caller is still responsible for deleting the Deflater when ownDeflater is false.
| outputStream | The OutputStream instance to wrap. |
| deflater | The user supplied Deflater to use for compression. ( |
| own | Should this filter take ownership of the OutputStream pointer (default is false). |
| ownDeflater | Should the filter take ownership of the passed Deflater object (default is false). |
| NullPointerException | if the Deflater given is NULL. |
References deflater, decaf::io::FilterOutputStream::outputStream, decaf::io::FilterOutputStream::own, and ownDeflater.
| decaf::util::zip::DeflaterOutputStream::DeflaterOutputStream | ( | decaf::io::OutputStream * | outputStream, |
| Deflater * | deflater, | ||
| int | bufferSize, | ||
| bool | own = false, | ||
| bool | ownDeflater = false ) |
Creates a new DeflateOutputStream with a user supplied Deflater and specified buffer size.
When the user supplied a Deflater instance the DeflaterOutpotStream does not take ownership of the Deflater pointer unless the ownDeflater parameter is set to true, otherwise the caller is still responsible for deleting the Deflater.
| outputStream | The OutputStream instance to wrap. |
| deflater | The user supplied Deflater to use for compression. |
| bufferSize | The size of the input buffer. |
| own | Should this filter take ownership of the OutputStream pointer (default is false). |
| ownDeflater | Should the filter take ownership of the passed Deflater object (default is false). |
| NullPointerException | if the Deflater given is NULL. |
| IllegalArgumentException | if bufferSize is 0. |
References deflater, decaf::io::FilterOutputStream::outputStream, decaf::io::FilterOutputStream::own, and ownDeflater.
|
virtual |
|
virtual |
Closes this object and deallocates the appropriate resources.The object is generally no longer usable after calling close.
| IOException | if an error occurs while closing. |
Finishes writing any remaining data to the OutputStream then closes the stream.
Reimplemented from decaf::io::FilterOutputStream.
|
protectedvirtual |
Writes a buffers worth of compressed data to the wrapped OutputStream.
|
protectedvirtual |
Reimplemented from decaf::io::FilterOutputStream.
|
protectedvirtual |
Reimplemented from decaf::io::FilterOutputStream.
|
virtual |
Finishes writing any remaining data to the wrapped OutputStream but does not close it upon completion.
| IOException | if an I/O error occurs. |
|
protected |
The Buffer to use for.
|
staticprotected |
|
protected |
The Deflater for this stream.
Referenced by DeflaterOutputStream(), and DeflaterOutputStream().
|
protected |
|
protected |
Referenced by DeflaterOutputStream(), and DeflaterOutputStream().