sys::Obj sys::Virtual sys::InStream sys::BufInStream
public final class BufInStream
BufInStream is used to read bytes from a memory Buf.
public Buf buf
public short pos
public void BufInStream(Buf buf)
Construct for specified Buf instance.
public override int read()
Read the next byte at pos and increment pos. Return -1 if pos >= size.
public override int readBytes(byte[] b, int off, int len)
Read the next block of available bytes starting from pos. Return the number of bytes copied into b and advance the position likewise.
public Str readStrInPlace(Str str)
Read the current position as a null terminated string. Return null on error.
public void rewind()
Rewind sets the pos back to zero to begin reading the Buf from the beginning.