Home

FileReader

Supports file read operations

Derived from: File

Implements: InputStream

Operations

New

Default constructor.

New(name:String)
Parameters
NameTypeDescription
nameStringfile name

Close

Closes the file

method : public : Close() ~ Nil

ReadBinaryFile

Reads a file's contents into byte array

function : public : ReadBinaryFile(name:String) ~ Byte[]
Parameters
NameTypeDescription
nameStringfile name

Return
TypeDescription
Byte[]byte array

ReadBuffer

Reads bytes into a byte buffer

method : public : ReadBuffer(offset:Int, num:Int, buffer:Char[]) ~ Int
Parameters
NameTypeDescription
offsetIntdestination buffer offset
numIntnumber of values to read
bufferChar[]input buffer

Return
TypeDescription
Intnumber of values read

Reads bytes into a character buffer

method : public : ReadBuffer(offset:Int, num:Int, buffer:Byte[]) ~ Int
Parameters
NameTypeDescription
offsetIntdestination buffer offset
numIntnumber of values to read
bufferByte[]input buffer

Return
TypeDescription
Intnumber of values read

ReadByte

Reads a byte

method : public : ReadByte() ~ Byte
Return
TypeDescription
Bytebyte read

ReadFile

Reads a file's contents into a string

function : public : ReadFile(name:String) ~ String
Parameters
NameTypeDescription
nameStringfile name

Return
TypeDescription
Stringcharacter string

ReadString

Reads a string until a newline or character return is detected

method : public : ReadString() ~ String
Return
TypeDescription
Stringcharacter string