ReadBytes
Previous  Next

Reads an array of Bytes from a file.
Syntax: ReadBytes (buffer As Byte(), count As Int32) As Int32

This method fills the array with the maximum of count bytes.
It returns the actual number of bytes read.
Example:
Sub Globals
      Dim buffer(4096) As Byte
End Sub

Sub App_Start
      FileOpen(c1,"data.dat",cRandom)
      bin.New1(c1,true)
      length = bin.ReadBytes(buffer(), 4096)
      FileClose(c1)
End Sub