Base interface for classes that sequentially read data from a binary stream.
interface
|
IBinaryReader
|
base of
|
IDataStream
|
||
ISerializer
|
Reads a number of bytes from the stream.
method
|
Read
(ByteBuffer bytes)
|
||
type
|
int32
|
||
params
|
bytes
|
[not-null]
|
The buffer where the read bytes will be stored. |
returns
|
|
The number of bytes the have been read. |
Remarks:
The number of bytes that are read from the stream may be less than the number of Remaining bytes in the given ByteBuffer, for any arbitrary reason.
Exceptions:
Reads a number of bytes from the stream.
method
|
ReadAll
(ByteBuffer bytes)
|
||
params
|
bytes
|
[not-null]
|
The buffer where the read bytes will be stored. |
Remarks:
The number of bytes that are read from the stream will be equal to the number of Remaining bytes in the given ByteBuffer.
Exceptions:
Reads a 32-bit floating point value from the data stream.
method
|
ReadFloat32
()
|
||
type
|
float32
|
||
returns
|
The read value. |
Exceptions:
Reads 32-bit floating point values from the data stream.
method
|
ReadFloat32s
(float32[] array,
int32 offset,
int32 count)
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Index of first array element to write. | |
count
|
[>=0]
|
Number of values to read. | |
returns
|
The read value. |
Exceptions:
Reads a 64-bit floating point value from the data stream.
method
|
ReadFloat64
()
|
||
type
|
float64
|
||
returns
|
The read value. |
Exceptions:
Reads 64-bit floating point values from the data stream.
method
|
ReadFloat64s
(float64[] array,
int32 offset,
int32 count)
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Index of first array element to write. | |
count
|
[>=0]
|
Number of values to read. | |
returns
|
The read value. |
Exceptions:
Reads a signed 16-bit integer value from the data stream using.
method
|
ReadInt16
()
|
||
type
|
int16
|
||
returns
|
The read value. |
Exceptions:
Reads signed 16-bit integer value values from the data stream.
method
|
ReadInt16s
(int16[] array,
int32 offset,
int32 count)
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Index of first array element to write. | |
count
|
[>=0]
|
Number of values to read. | |
returns
|
The read value. |
Exceptions:
Reads a signed 32-bit integer value from the data stream.
method
|
ReadInt32
()
|
||
type
|
int32
|
||
returns
|
The read value. |
Exceptions:
Reads signed 32-bit integer value values from the data stream.
method
|
ReadInt32s
(int32[] array,
int32 offset,
int32 count)
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Index of first array element to write. | |
count
|
[>=0]
|
Number of values to read. | |
returns
|
The read value. |
Exceptions:
Reads a signed 64-bit integer value from the data stream.
method
|
ReadInt64
()
|
||
type
|
int64
|
||
returns
|
The read value. |
Exceptions:
Reads signed 64-bit integer value values from the data stream.
method
|
ReadInt64s
(int64[] array,
int32 offset,
int32 count)
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Index of first array element to write. | |
count
|
[>=0]
|
Number of values to read. | |
returns
|
The read value. |
Exceptions:
Reads an 8-bit value from the stream.
method
|
ReadInt8
()
|
||
type
|
int8
|
||
returns
|
The read value. |
Exceptions:
Reads signed 8-bit integer value values from the data stream.
method
|
ReadInt8s
(int8[] array,
int32 offset,
int32 count)
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Index of first array element to write. | |
count
|
[>=0]
|
Number of values to read. | |
returns
|
The read value. |
Exceptions:
Reads an unsigned 16-bit integer value from the data stream.
method
|
ReadUInt16
()
|
||
type
|
int32
|
||
returns
|
The read value. |
Exceptions:
Reads an unsigned 32-bit integer value from the data stream.
method
|
ReadUInt32
()
|
||
type
|
int64
|
||
returns
|
The read value. |
Exceptions:
Reads an unsigned 8-bit integer from the data stream.
method
|
ReadUInt8
()
|
||
type
|
int32
|
||
returns
|
The read value. |
Exceptions:
Reads an unsigned 8-bit value from the stream.
method
|
TryReadUInt8
()
|
||
type
|
int32
|
||
returns
|
|
The
unsigned
8-bit
value
or
-1
if
the
end
of
the
stream
has
been
reached.
|
Reads a number of bytes from the stream.
method
|
ReadEof
(ByteBuffer bytes)
|
||
type
|
int32
|
||
params
|
bytes
|
[not-null]
|
The buffer where the read bytes will be stored. |
returns
|
|
The
number
of
bytes
that
have
been
read
into
bytes.
A
value
of
0
indicates
that
the
end
of
file
has
been
reached
(assuming
bytes
had
at
least
one
remaining
byte).
|
Remarks:
The number of bytes that are read from the stream will be equal to the number of Remaining bytes in the given ByteBuffer, except when the end of file is reached (the returned value will be smaller in this case).
Exceptions: