ReadableStream.get

Gets data of the specified type T off the stream. The byte order of the T on the stream must be specified unless it is irrelevant (e.g. single byte entries).

// get an int out of a big endian stream
int i = stream.get!int(ByteOrder.bigEndian);

// get i bytes off the stream
ubyte[] data = stream.get!(ubyte[])(i);

Meta