IOStream

A stream that allows both reading and writing data

interface IOStream : InputStream , OutputStream

Inherited Members

From InputStream

readable
bool readable()

Returns true if there are any data to read. false means end of the stream.

readBytes
size_t readBytes(void* buffer, size_t count)

Attempts to read count bytes from stream and stores them in memory pointing by buffer. Returns number of bytes actually read

fillArray
bool fillArray(T[] array)

Attempts to fill an array with raw data from stream. Returns true if the array was filled, false otherwise

readLE
bool readLE(T* value)

Reads little-endian integer, converts to native-endian and stores in value

readBE
bool readBE(T* value)

Reads big-endian integer, converts to native-endian and stores in value

From OutputStream

flush
void flush()

Implementation-specific method. Usually it writes any unwritten data from output buffer

writeable
bool writeable()

Returns true if stream can be written to, false otherwise

writeBytes
size_t writeBytes(void* buffer, size_t count)

Attempts to write count bytes from the memory pointed by buffer. Returns number of bytes actually written

writeArray
bool writeArray(T[] array)

Attempts to write an array. Returns true if all elements were written, false otherwise

writeStringz
bool writeStringz(string text)

Attempts to write a string as zero-terminated. Returns true if entire string was written, false otherwise

writeLE
bool writeLE(T value)

Writes an integer in little-endian encoding

writeBE
bool writeBE(T value)

Writes an integer in big-endian encoding

Meta