# sys::InStream

    sys::Obj
      sys::Virtual
        sys::InStream

`public abstract class InStream`

InStream is used to input text or binary data.

close

  `public virtual void close()`

  Close the stream. Default implementation does nothing.

read

  `public abstract int read()`

  Read an unsigned single byte. Return -1 if end of stream is reached.

readBool

  `public bool readBool()`

  Read a boolean value of zero or non-zero.

readBytes

  `public abstract int readBytes(byte[] b, int off, int len)`

  Read a block of bytes. Return number of bytes read into b, or -1 if end of stream.

readChar

  `public int readChar()`

  Read a single character (right now we only read ASCII).

readF4

  `public float readF4()`

  Read a four byte (32-bit) floating point value in network byte order

readF8

  `public double readF8()`

  Read a eight byte (64-bit) floating point value in network byte order

readS4

  `public int readS4()`

  Read an signed four byte (32-bit) integer in network byte order. Return -1 if end of stream.

readS8

  `public long readS8()`

  Read an signed eight byte (64-bit) integer in network byte order. Return -1 if end of stream.

readStr

  `public bool readStr(Str s, int max)`

  Read a null terminated string into a buffer. Return true on success, false on error or end of stream.

readU2

  `public int readU2()`

  Read an unsigned two byte integer in network byte order. Return -1 if end of stream.

skip

  `public void skip(int n)`

  Skip n number of bytes.