Represents an in-memory output byte stream. More...
#include <fwd.h>
Public Types | |
typedef char | Ch |
Public Member Functions | |
void | Clear () |
void | Flush () |
GenericMemoryBuffer (Allocator *allocator=0, size_t capacity=kDefaultCapacity) | |
const Ch * | GetBuffer () const |
size_t | GetSize () const |
void | Pop (size_t count) |
Ch * | Push (size_t count) |
void | Put (Ch c) |
void | ShrinkToFit () |
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. |
typedef char GenericMemoryBuffer< Allocator >::Ch |
Definition at line 40 of file memorybuffer.h.
|
inline |
Definition at line 42 of file memorybuffer.h.
|
inline |
Definition at line 54 of file memorybuffer.h.
|
inline |
Definition at line 50 of file memorybuffer.h.
|
inline |
Definition at line 71 of file memorybuffer.h.
|
inline |
Definition at line 76 of file memorybuffer.h.
|
inline |
Definition at line 66 of file memorybuffer.h.
|
inline |
Definition at line 62 of file memorybuffer.h.
|
inline |
Definition at line 46 of file memorybuffer.h.
|
inline |
Definition at line 58 of file memorybuffer.h.
|
static |
Definition at line 81 of file memorybuffer.h.
|
mutable |
Definition at line 82 of file memorybuffer.h.