#include <GStream.h>

Public Member Functions | |
| GMemStream () | |
| Builds an empty memory stream. | |
| GMemStream (GStreamI *Src, int64 Start, int64 Len) | |
| Builds memory from sub-stream. | |
| GMemStream (void *Mem, int64 Len, bool Copy=true) | |
| Builds a memory stream by copying from another memory block. | |
| GMemStream (int GrowBlockSize) | |
| Growable array to write to. | |
| bool | IsOpen () |
| Returns true is the connection is still open. | |
| int | Close () |
| int64 | GetSize () |
| Gets the size of the stream. | |
| int64 | GetPos () |
| Gets the current position of the stream. | |
| int64 | SetPos (int64 p) |
| Sets the current position of the stream. | |
| int | Open (char *Str, int Int) |
| Opens a file and reads it all into memory. | |
| int64 | SetSize (int64 Size) |
| Changes the size of the memory block, keeping any common bytes. | |
| int | Read (void *Buffer, int Size, int Flags=0) |
| Read bytes out of the stream. | |
| int | Write (void *Buffer, int Size, int Flags=0) |
| Write bytes to the stream. | |
| GStreamI * | Clone () |
| Creates a dynamically allocated copy of the same type of stream. This new stream is not connected to anything. | |
Builds memory from sub-stream.
| Src | The source stream |
| Start | The starting position in the stream, or -1 for the current position. Use -1 for non-seekable streams like sockets |
| Len | The length of the sub-stream, or -1 to read all the data to the end |
References GBytePipe::GetSize(), GetSize(), GBytePipe::New(), and GBytePipe::Write().
| GMemStream::GMemStream | ( | void * | Mem, | |
| int64 | Len, | |||
| bool | Copy = true | |||
| ) |
Builds a memory stream by copying from another memory block.
| Mem | The source memory block |
| Len | The length of the block |
| Copy | Whether to copy the block or reference memory we don't own |
| GStreamI * GMemStream::Clone | ( | ) | [virtual] |
Creates a dynamically allocated copy of the same type of stream. This new stream is not connected to anything.
Reimplemented from GStream.
References GMemStream().
| int GMemStream::Close | ( | ) | [virtual] |
| int64 GMemStream::GetPos | ( | ) | [inline, virtual] |
Gets the current position of the stream.
Reimplemented from GStream.
| int64 GMemStream::GetSize | ( | ) | [inline, virtual] |
Gets the size of the stream.
Reimplemented from GStream.
Referenced by GMemStream().
| int GMemStream::Read | ( | void * | Buffer, | |
| int | Size, | |||
| int | Flags = 0 | |||
| ) | [virtual] |
Read bytes out of the stream.
Reimplemented from GStream.
Sets the current position of the stream.
Reimplemented from GStream.
| int GMemStream::Write | ( | void * | Buffer, | |
| int | Size, | |||
| int | Flags = 0 | |||
| ) | [virtual] |
Write bytes to the stream.
Reimplemented from GStream.
1.5.7.1