Interface IOStream
A stream that allows both reading and writing data
Properties
Name | Type | Description |
getPosition [get]
|
ulong | Returns current position
|
Methods
Name | Description |
close
()
|
Closes the stream. Closed stream cannot be read or written any more
|
fillArray
(array)
|
Attempts to fill an array with raw data from stream.
Returns true if the array was filled, false otherwise
|
flush
()
|
Implementation-specific method. Usually it writes any unwritten data from output buffer
|
position
(pos)
|
Attempts to set current position to pos.
Throws SeekException on failure
|
readable
()
|
Returns true if there are any data to read. false means end of the stream.
|
readBE
(value)
|
Reads big-endian integer, converts to native-endian
and stores in value
|
readBytes
(buffer, count)
|
Attempts to read count bytes from stream and stores them in memory
pointing by buffer. Returns number of bytes actually read
|
readLE
(value)
|
Reads little-endian integer, converts to native-endian
and stores in value
|
seek
(amount)
|
Relatively changes position.
amount defines an offset from the current position (can be negative).
Throws SeekException on failure
|
seekable
()
|
Returns true if it is legal to use Seekable functionality on this stream
|
setPosition
(pos)
|
Attempts to set current position to pos.
Returns true on success, false on failure
|
size
()
|
Returns the size of a stream in bytes
|
writeable
()
|
Returns true if stream can be written to, false otherwise
|
writeArray
(array)
|
Attempts to write an array.
Returns true if all elements were written, false otherwise
|
writeBE
(value)
|
Writes an integer in big-endian encoding
|
writeBytes
(buffer, count)
|
Attempts to write count bytes from the memory pointed by buffer.
Returns number of bytes actually written
|
writeLE
(value)
|
Writes an integer in little-endian encoding
|
writeStringz
(text)
|
Attempts to write a string as zero-terminated.
Returns true if entire string was written, false otherwise
|