template<typename Allocator = CrtAllocator>
struct GenericMemoryBuffer< Allocator >
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:
- StringBuffer has Encoding but MemoryBuffer is only a byte buffer.
- StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator.
- Template Parameters
-
Allocator | type for allocating memory buffer. |
- Note
- implements Stream concept