![]() | InDesign SDK 20.5 |
#include <IXferBytes.h>

Public Member Functions | |
| virtual uint32 | Read (void *buffer, uint32 num)=0 |
| virtual uint32 | Write (void *buffer, uint32 num)=0 |
| virtual uint64 | Seek (int64 numberOfBytes, SeekFromWhere fromHere)=0 |
| virtual void | Flush ()=0 |
| virtual StreamState | GetStreamState ()=0 |
| virtual void | SetEndOfStream ()=0 |
IXferBytes is a very simple streaming protocol that underlies the streaming classes. Generally you do not need to access it directly, but it can be useful if you are want to have a read-write stream, or if you need to implement a new stream implementation.
| pure virtual |
Flush all pending output out to the stream.
Implemented in PrtMemMemoryXferBytes, and IDHAMemoryXferBytes.
| pure virtual |
Get the stream status (how to check for end of file).
Implemented in PrtMemMemoryXferBytes, and IDHAMemoryXferBytes.
| pure virtual |
Read the next num bytes from the stream into the buffer. Returns the number of bytes that were read in, this can be less than the number requested if end of stream or some other error is encountered.
| buffer | where to put the data read in |
| num | number of bytes requested to read |
Implemented in PrtMemMemoryXferBytes, and IDHAMemoryXferBytes.
| pure virtual |
Set the stream's current location. Returns the current (new) position as an offset from the start of the stream.
| numberOfBytes | how far to seek |
| fromHere | seek relative to this point (start, current, or end) |
Implemented in PrtMemMemoryXferBytes, and IDHAMemoryXferBytes.
| pure virtual |
Truncate the stream at the current location. Any read past this point will encounter end of stream.
Implemented in PrtMemMemoryXferBytes, and IDHAMemoryXferBytes.
| pure virtual |
Write num bytes from the buffer into the stream at the current location. Returns the number of bytes that were actually written out.
| buffer | contains the data to write |
| num | number of bytes requested to write |
Implemented in PrtMemMemoryXferBytes, and IDHAMemoryXferBytes.