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 45 of file memorybuffer.h.
|
inline |
Definition at line 47 of file memorybuffer.h.
|
inline |
Definition at line 54 of file memorybuffer.h.
|
inline |
Definition at line 52 of file memorybuffer.h.
|
inline |
Definition at line 59 of file memorybuffer.h.
|
inline |
Definition at line 61 of file memorybuffer.h.
|
inline |
Definition at line 57 of file memorybuffer.h.
|
inline |
Definition at line 56 of file memorybuffer.h.
|
inline |
Definition at line 51 of file memorybuffer.h.
|
inline |
Definition at line 55 of file memorybuffer.h.
|
static |
Definition at line 63 of file memorybuffer.h.
|
mutable |
Definition at line 64 of file memorybuffer.h.