10 This class is mainly for being wrapped by EncodedInputStream or AutoUTFInputStream.
11
12 It is similar to FileReadBuffer but the source is an in-memory buffer instead of a file.
13
14 Differences between MemoryStream and StringStream:
15 1. StringStream has encoding but MemoryStream is a byte stream.
16 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.
17 3. MemoryStream supports Peek4() for encoding detection. StringStream is specified with an encoding so it should not have Peek4().