Drag[en]gine Script Module DragonScript
1.21
|
Public Member Functions | |
Management | |
String | getFilename () |
File name. More... | |
int | getLength () |
File size in bytes. More... | |
int | getPosition () |
Current reading position in bytes from the beginning of the file. More... | |
void | setPosition (int position) |
Set reading file position in bytes relative to beginning of file. More... | |
void | movePosition (int offset) |
Move reading file position by offset in bytes. More... | |
void | setPositionEnd (int position) |
Set reading file position in bytes relative to end of file. More... | |
int | getStreamVersion () |
Stream version used by readFromFile of native classes. More... | |
void | setStreamVersion (int version) |
Set stream version used by readFromFile of native classes. More... | |
bool | eof () |
File reading pointer is at the end of file. More... | |
int | readChar () |
Read one byte (1 byte) and advance the file reading position. More... | |
int | readByte () |
Read one unsigned byte (1 byte) and advance the file reading position. More... | |
int | readShort () |
Read one short (2 bytes) and advance the file reading position. More... | |
int | readUShort () |
Read one unsigned short (2 bytes) and advance the file reading position. More... | |
int | readInt () |
Read one int (4 bytes) and advance the file reading position. More... | |
int | readUInt () |
Read one unsigned int (4 bytes) and advance the file reading position. More... | |
float | readFloat () |
Read one float (4 bytes) and advance the file reading position. More... | |
String | readString8 () |
Read string prefixed by a 1-byte length field and advance the file reading position. More... | |
String | readString16 () |
Read string prefixed by a 2-byte2 length field and advance the file reading position. More... | |
String | readString (int size) |
Read string without length field and advance the file reading position. More... | |
void | skipString8 () |
Skips string prefixed by a 1-byte length field and advance the file reading position. More... | |
void | skipString16 () |
Skips string prefixed by a 2-byte2 length field and advance the file reading position. More... | |
TimeDate | readTimeDate () |
Read TimeDate instance. More... | |
Constructors | |
FileReader | new (String filename) |
Create file reader reading from virtual file system file. More... | |
static FileReader | newZCompressed (String filename) |
Create Z-Decompressing file reader reading from virtual file system file. More... | |
File reader.
This is a native class.
bool Dragengine.FileReader.eof | ( | ) |
File reading pointer is at the end of file.
String Dragengine.FileReader.getFilename | ( | ) |
File name.
int Dragengine.FileReader.getLength | ( | ) |
File size in bytes.
int Dragengine.FileReader.getPosition | ( | ) |
Current reading position in bytes from the beginning of the file.
int Dragengine.FileReader.getStreamVersion | ( | ) |
Stream version used by readFromFile of native classes.
void Dragengine.FileReader.movePosition | ( | int | offset | ) |
Move reading file position by offset in bytes.
FileReader Dragengine.FileReader.new | ( | String | filename | ) |
Create file reader reading from virtual file system file.
|
static |
Create Z-Decompressing file reader reading from virtual file system file.
int Dragengine.FileReader.readByte | ( | ) |
Read one unsigned byte (1 byte) and advance the file reading position.
int Dragengine.FileReader.readChar | ( | ) |
Read one byte (1 byte) and advance the file reading position.
float Dragengine.FileReader.readFloat | ( | ) |
Read one float (4 bytes) and advance the file reading position.
int Dragengine.FileReader.readInt | ( | ) |
Read one int (4 bytes) and advance the file reading position.
int Dragengine.FileReader.readShort | ( | ) |
Read one short (2 bytes) and advance the file reading position.
String Dragengine.FileReader.readString | ( | int | size | ) |
Read string without length field and advance the file reading position.
String Dragengine.FileReader.readString16 | ( | ) |
Read string prefixed by a 2-byte2 length field and advance the file reading position.
String Dragengine.FileReader.readString8 | ( | ) |
Read string prefixed by a 1-byte length field and advance the file reading position.
TimeDate Dragengine.FileReader.readTimeDate | ( | ) |
Read TimeDate instance.
int Dragengine.FileReader.readUInt | ( | ) |
Read one unsigned int (4 bytes) and advance the file reading position.
int Dragengine.FileReader.readUShort | ( | ) |
Read one unsigned short (2 bytes) and advance the file reading position.
void Dragengine.FileReader.setPosition | ( | int | position | ) |
Set reading file position in bytes relative to beginning of file.
void Dragengine.FileReader.setPositionEnd | ( | int | position | ) |
Set reading file position in bytes relative to end of file.
void Dragengine.FileReader.setStreamVersion | ( | int | version | ) |
Set stream version used by readFromFile of native classes.
void Dragengine.FileReader.skipString16 | ( | ) |
Skips string prefixed by a 2-byte2 length field and advance the file reading position.
void Dragengine.FileReader.skipString8 | ( | ) |
Skips string prefixed by a 1-byte length field and advance the file reading position.