#include <coherence/io/ReadBuffer.hpp>
Inherits Object.
Public Types | |
typedef spec::Handle | Handle |
BufferInput Handle definition. | |
typedef spec::View | View |
BufferInput View definition. | |
typedef spec::Holder | Holder |
BufferInput Holder definition. | |
Public Member Functions | |
virtual ReadBuffer::View | getBuffer () const =0 |
Get the ReadBuffer object that this BufferInput is reading from. | |
virtual size32_t | getOffset () const =0 |
Determine the current offset of this BufferInput within the underlying ReadBuffer. | |
virtual void | setOffset (size32_t of)=0 |
Specify the offset of the next octet to read from the underlying ReadBuffer. | |
virtual size32_t | available () const =0 |
Returns the number of octets that can be read (or skipped over) from this input stream before the end of the stream is reached. | |
virtual void | skip (size32_t cb)=0 |
Skips over the specified number of octets of data. | |
virtual octet_t | read ()=0 |
Read an octet value. | |
virtual void | read (Array< octet_t >::Handle hab)=0 |
Read hab->length octets and store them in hab . | |
virtual void | read (Array< octet_t >::Handle hab, size32_t of, size32_t cb)=0 |
Read cb octets from the input stream and store them into the passed array hab starting at offset of . | |
virtual ReadBuffer::View | readBuffer (size32_t cb)=0 |
Read cb octets and return them as a ReadBuffer object. | |
virtual bool | readBoolean ()=0 |
Read a boolean value. | |
virtual wchar16_t | readChar16 ()=0 |
Read a 16-bit Unicode character value. | |
virtual String::View | readString ()=0 |
Read a sequence of UTF-8 encoded 16-bit Unicode characters. | |
virtual int16_t | readInt16 ()=0 |
Read a 16-bit integer value. | |
virtual int32_t | readInt32 ()=0 |
Read a 32-bit integer value. | |
virtual int64_t | readInt64 ()=0 |
Read a 64-bit integer value. | |
virtual float32_t | readFloat32 ()=0 |
Read a 32-bit floating-point value. | |
virtual float64_t | readFloat64 ()=0 |
Read a 64-bit floating-point value. |
virtual ReadBuffer::View getBuffer | ( | ) | const [pure virtual] |
Get the ReadBuffer object that this BufferInput is reading from.
virtual size32_t getOffset | ( | ) | const [pure virtual] |
Determine the current offset of this BufferInput within the underlying ReadBuffer.
virtual void setOffset | ( | size32_t | of | ) | [pure virtual] |
Specify the offset of the next octet to read from the underlying ReadBuffer.
of | the offset of the next octet to read from the ReadBuffer |
IndexOutOfBoundsException | if of > getBuffer()->length() |
virtual size32_t available | ( | ) | const [pure virtual] |
Returns the number of octets that can be read (or skipped over) from this input stream before the end of the stream is reached.
virtual void skip | ( | size32_t | cb | ) | [pure virtual] |
Skips over the specified number of octets of data.
cb | the number of octets to skip over |
EOFException | if the stream is exhausted before the number of octets indicated could be skipped | |
IOException | if an I/O error occurs |
virtual octet_t read | ( | ) | [pure virtual] |
Read an octet value.
octet_t
valueEOFException | if the value could not be read because no more data remains to be read | |
IOException | if an I/O error occurs |
Read hab->length
octets and store them in hab
.
hab | the array to store the octets which are read from the stream |
NullPointerException | if the passed array is NULL | |
EOFException | if the stream is exhausted before the number of octets indicated by the array length could be read | |
IOException | if an I/O error occurs |
Read cb
octets from the input stream and store them into the passed array hab
starting at offset of
.
hab | the array to store the octets which are read from the stream | |
of | the offset into the array that the read octets will be stored | |
cb | the number of octets to read |
NullPointerException | if the passed array is NULL | |
IndexOutOfBoundsException | if of+cb is greater than the length of the hab | |
EOFException | if the stream is exhausted before the number of octets indicated could be read | |
IOException | if an I/O error occurs |
virtual ReadBuffer::View readBuffer | ( | size32_t | cb | ) | [pure virtual] |
Read cb
octets and return them as a ReadBuffer object.
cb | the number of octets to read |
cb
octets read from the BufferInputEOFException | if the stream is exhausted before the number of octets indicated could be read | |
IOException | if an I/O error occurs |
virtual bool readBoolean | ( | ) | [pure virtual] |
Read a boolean value.
true
or false
EOFException | if the value could not be read because no more data remains to be read | |
IOException | if an I/O error occurs |
virtual wchar16_t readChar16 | ( | ) | [pure virtual] |
Read a 16-bit Unicode character value.
wchar16_t
valueEOFException | if the value could not be read because no more data remains to be read | |
IOException | if an I/O error occurs |
virtual String::View readString | ( | ) | [pure virtual] |
Read a sequence of UTF-8 encoded 16-bit Unicode characters.
IOException | if an I/O error occurs |
virtual int16_t readInt16 | ( | ) | [pure virtual] |
Read a 16-bit integer value.
int16_t
valueEOFException | if the value could not be read because no more data remains to be read | |
IOException | if an I/O error occurs |
virtual int32_t readInt32 | ( | ) | [pure virtual] |
Read a 32-bit integer value.
int32_t
valueEOFException | if the value could not be read because no more data remains to be read | |
IOException | if an I/O error occurs |
virtual int64_t readInt64 | ( | ) | [pure virtual] |
Read a 64-bit integer value.
int64_t
valueEOFException | if the value could not be read because no more data remains to be read | |
IOException | if an I/O error occurs |
virtual float32_t readFloat32 | ( | ) | [pure virtual] |
Read a 32-bit floating-point value.
float32_t
valueEOFException | if the value could not be read because no more data remains to be read | |
IOException | if an I/O error occurs |
virtual float64_t readFloat64 | ( | ) | [pure virtual] |
Read a 64-bit floating-point value.
float64_t
valueEOFException | if the value could not be read because no more data remains to be read | |
IOException | if an I/O error occurs |