struct MemoryStream

Defined at line 40 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

Represents an in-memory input byte stream.

This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream.

It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file.

Differences between MemoryStream and StringStream:

1. StringStream has encoding but MemoryStream is a byte stream.

2. MemoryStream needs size of the source buffer and the buffer don't need to be null terminated. StringStream assume null-terminated string as source.

3. MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4().

Public Members

const Ch * src_
const Ch * begin_
const Ch * end_
size_t size_

Public Methods

void MemoryStream (const Ch * src, size_t size)

Defined at line 43 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

Ch Peek ()

Defined at line 45 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

Ch Take ()

Defined at line 46 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

size_t Tell ()

Defined at line 47 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

Ch * PutBegin ()

Defined at line 49 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

void Put (Ch )

Defined at line 50 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

void Flush ()

Defined at line 51 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

size_t PutEnd (Ch * )

Defined at line 52 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h

const Ch * Peek4 ()

For encoding detection only.

Defined at line 55 of file ../../third_party/rapidjson/include/rapidjson/memorystream.h