Interface InputStream
A stream inteface that allows to read data from it.
Reading any data implies position advance by corresponding number of bytes.
Methods shouldn't throw on EOF, may throw on a more serious error
interface InputStream
:
Stream
;
Properties
Name | Type | Description |
getPosition [get]
|
ulong | Returns current position
|
Methods
Name | Description |
fillArray
(array)
|
Attempts to fill an array with raw data from stream.
Returns true if the array was filled, false otherwise
|
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
|
close
()
|
Closes the stream. Closed stream cannot be read or written any more
|
position
(pos)
|
Attempts to set current position to pos.
Throws SeekException on failure
|
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
|