Public Member Functions |
| ByteArrayOutputStream () |
| Default Constructor - uses a default internal buffer of 32 bytes, the size increases as the need for more room arises.
|
| ByteArrayOutputStream (int bufferSize) |
| Creates a ByteArrayOutputStream with an internal buffer allocated with the given size.
|
virtual | ~ByteArrayOutputStream () |
std::pair< unsigned char *, int > | toByteArray () const |
| Creates a newly allocated byte array.
|
long long | size () const |
| Gets the current count of bytes written into this ByteArrayOutputStream.
|
virtual void | reset () |
| Clear current Stream contents.
|
virtual std::string | toString () const |
| Converts the bytes in the buffer into a standard C++ string.
|
void | writeTo (OutputStream *out) const |
| Writes the complete contents of this byte array output stream to the specified output stream argument, as if by calling the output stream's write method using out.write( buf, 0, count ).
|
| OutputStream () |
virtual | ~OutputStream () |
virtual void | close () |
| Closes this object and deallocates the appropriate resources.The object is generally no longer usable after calling close.- Exceptions
-
|
virtual void | flush () |
| Flushes this stream by writing any buffered output to the underlying stream.- Exceptions
-
|
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 () |