Stream

Abstract i/o stream interface

Constructors

this
this(string[string] metadata, Endian e)
Undocumented in source.

Members

Functions

getContents
ubyte[] getContents()

Reads entire stream as ubyte[] array

getEndian
Endian getEndian()
getMetadata
string getMetadata(string key)
isEmpty
bool isEmpty()
isReadable
bool isReadable()
isSeekable
bool isSeekable()
isWritable
bool isWritable()
length
ssize_t length()
read
ubyte read()

Reads an unsigned byte from the stream

read
ubyte[] read(size_t n)

Reads an array of ubytes from the stream

seek
ssize_t seek(sdiff_t pos, Seek origin)

Sets the current position in the stream

setEndian
void setEndian(Endian e)

Sets the stream endianness. Affects on the byte order during read and write units and ulongs.

tell
ssize_t tell()

Returns the current positon in the stream

write
void write(ubyte b)

Writes an unsigned byte to the stream

write
void write(ubyte[] b)

Writes an array of unsigned bytes to the stream

Variables

endian
Endian endian;
Undocumented in source.
metadata
string[string] metadata;
Undocumented in source.

Inherited Members

From StreamInterface

setEndian
void setEndian(Endian e)

Sets the stream endianness. Affects on the byte order during read and write units and ulongs.

getEndian
Endian getEndian()
length
ssize_t length()
tell
ssize_t tell()

Returns the current positon in the stream

isEmpty
bool isEmpty()
isSeekable
bool isSeekable()
seek
ssize_t seek(sdiff_t pos, Seek origin)

Sets the current position in the stream

isWritable
bool isWritable()
write
void write(ubyte b)

Writes an unsigned byte to the stream

write
void write(ubyte[] b)

Writes an array of unsigned bytes to the stream

isReadable
bool isReadable()
read
ubyte read()

Reads an unsigned byte from the stream

read
ubyte[] read(size_t n)

Reads an array of ubytes from the stream

getContents
ubyte[] getContents()

Reads entire stream as ubyte[] array

getMetadata
string getMetadata(string key)

Meta