Represents an in-memory output byte stream. More...
#include <memorybuffer.h>
| Public Types | |
| typedef char | Ch | 
| Public Member Functions | |
| GenericMemoryBuffer (Allocator *allocator=0, size_t capacity=kDefaultCapacity) | |
| void | Put (Ch c) | 
| void | Flush () | 
| void | Clear () | 
| void | ShrinkToFit () | 
| Ch * | Push (size_t count) | 
| void | Pop (size_t count) | 
| const Ch * | GetBuffer () const | 
| size_t | GetSize () const | 
| Public Attributes | |
| internal::Stack< Allocator > | stack_ | 
| Static Public Attributes | |
| static const size_t | kDefaultCapacity = 256 | 
Represents an in-memory output byte stream.
This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream.
It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file.
Differences between MemoryBuffer and StringBuffer:
| Allocator | type for allocating memory buffer. |