Skip to content

Std memory datastream new

std:std.memory.DataStream.New

Method New:Void( buf:DataBuffer,offset:Int=0 )#
Method New:Void( buf:DataBuffer,offset:Int,count:Int )#

Creates a new datastream.

A datastream wraps a databuffer so it can be used as if it were a stream.

In debug mode, a RuntimeError will occur if offset or count are outside the range of the databuffer.

Parameters
data data The databuffer to wrap.
offset offset The starting offset.
count count The number of bytes.