Moai SDK  2.0
MOAIByteStream Class Reference
+ Inheritance diagram for MOAIByteStream:

Function List

close
 
open
 
- Function List inherited from MOAIStream
collapse
 
compact
 
flush
 
getCursor
 
getLength
 
read
 
read8
 
read16
 
read32
 
readBoolean
 
readDouble
 
readFloat
 
readFormat
 
readU8
 
readU16
 
readU32
 
seek
 
write
 
write8
 
write16
 
write32
 
writeBoolean
 
writeColor32
 
writeDouble
 
writeFloat
 
writeFormat
 
writeStream
 
writeU8
 
writeU16
 
writeU32
 

Function Documentation

close

Release the byte stream's internal buffer.


function close ( MOAIByteStream self )

Parameters
MOAIByteStreamself
Returns
nil
open

Allocate and initialize the byte stream's internal buffer.


function open ( MOAIByteStream self, string buffer )

Parameters
MOAIByteStreamself
stringbuffer Initialize the stream's buffer as a copy of provided string.
Returns
nil
Note

function open ( MOAIByteStream self, number size )

Parameters
MOAIByteStreamself
numbersize Initialize the stream with a buffer of the given size. Buffer will be filled with zero.
Returns
nil
Note