back to index

PakFile

Inheritance

Object -> Stream -> PakFile

Properties

byteOrder - readwrite, BIG_ENDIAN or LITTLE_ENDIAN
object    - read, 
offset    - readwrite
size      - read
i8        - read byte from stream
i16       - read word from stream
i32       - read dword from stream
f32       - read floating point number from stream

Constants

SEEK_BEG, SEEK_CUR, SEEK_END - arguments to seek() 
ERRINVALIDSEEK, ERRIO, ERRCREATEFILE, ERROPENFILE - error codes

Methods

       close                ()
       deserialize          (Object _o, int _rtti)
int    eof                  ()
int    getByteOrder         ()
int    getErrorCode         ()
String getErrorStringByCode (int _code)
int    getI8                ()
int    getI16               () - expands sign
int    getI32               ()
float  getF32               ()
       getObject            (Object _o)
int    getOffset            ()
int    getSize              ()
int    isOpen               ()
int    open                 (String _name)
int    readBuffer           (Buffer _b, int _off, int _num, int  _resize)
int    readString           (String _s, int _num)
       seek                 (int _mode, int _off)
       serialize            (Object _o, int _rtti)
       setByteOrder         (int _order) - BIG_ENDIAN or LITTLE_ENDIAN
       setOffset            (int _off)

Example

testfileio.tks
3ds.tks
md2.tks

back to index