DataInputStream

An input stream that is wrapped around a byte input stream, so that values may be read from the stream as bytes.

Constructors

this
this(S stream, Endianness endianness)

Constructs a data input stream that reads from a given underlying byte input stream.

Members

Functions

readFromStream
StreamResult readFromStream(ubyte[] buffer)

Delegates reading to the underlying stream.

readFromStream
DataReadResult!T readFromStream()

Reads a value from the stream and returns either the value that was read successfully, or an error message. If you want to ignore errors, you can use readFromStreamOrDefault instead.

readFromStreamOrDefault
T readFromStreamOrDefault(T defaultValue)

Reads a value from the stream, or return a default value if reading fails for any reason.

Meta