#include <coherence/io/WriteBuffer.hpp>
Inherits Object.
Inherited by AbstractWriteBuffer::AbstractBufferOutput [virtual]
.
Public Types | |
typedef spec::Handle | Handle |
BufferOutput Handle definition. | |
typedef spec::View | View |
BufferOutput View definition. | |
typedef spec::Holder | Holder |
BufferOutput Holder definition. | |
Public Member Functions | |
virtual WriteBuffer::Handle | getBuffer ()=0 |
Get the WriteBuffer object that this BufferOutput is writing to. | |
virtual WriteBuffer::View | getBuffer () const =0 |
Get the WriteBuffer object that this BufferOutput is writing to. | |
virtual size32_t | getOffset () const =0 |
Determine the current offset of this BufferOutput within the underlying WriteBuffer. | |
virtual void | setOffset (size32_t of)=0 |
Specify the offset of the next octet to write to the underlying WriteBuffer. | |
virtual void | write (octet_t b)=0 |
Write the given octet. | |
virtual void | write (Array< octet_t >::View vab)=0 |
Writes all the octets in the array vab . | |
virtual void | write (Array< octet_t >::View vab, size32_t of, size32_t cb)=0 |
Writes cb octets starting at offset of from the array vab . | |
virtual void | writeBuffer (ReadBuffer::View vBuf)=0 |
Write all the octets from the passed ReadBuffer object. | |
virtual void | writeBuffer (ReadBuffer::View vBuf, size32_t of, size32_t cb)=0 |
Write cb octets from the passed ReadBuffer object starting at offset of within the passed ReadBuffer. | |
virtual void | writeBoolean (bool f)=0 |
Write a boolean value. | |
virtual void | writeChar16 (wchar16_t ch)=0 |
Write a 16-bit Unicode character value. | |
virtual void | writeString (String::View vs)=0 |
Write a sequence of UTF-8 encoded 16-bit Unicode characters. | |
virtual void | writeInt16 (int16_t n)=0 |
Write a 16-bit integer value. | |
virtual void | writeInt32 (int32_t n)=0 |
Write a 32-bit integer value. | |
virtual void | writeInt64 (int64_t n)=0 |
Write a 64-bit integer value. | |
virtual void | writeFloat32 (float32_t fl)=0 |
Write a 32-bit floating-point value. | |
virtual void | writeFloat64 (float64_t dfl)=0 |
Write a 64-bit floating-point value. |
virtual WriteBuffer::Handle getBuffer | ( | ) | [pure virtual] |
Get the WriteBuffer object that this BufferOutput is writing to.
Implemented in AbstractWriteBuffer::AbstractBufferOutput.
virtual WriteBuffer::View getBuffer | ( | ) | const [pure virtual] |
Get the WriteBuffer object that this BufferOutput is writing to.
Implemented in AbstractWriteBuffer::AbstractBufferOutput.
virtual size32_t getOffset | ( | ) | const [pure virtual] |
Determine the current offset of this BufferOutput within the underlying WriteBuffer.
Implemented in AbstractWriteBuffer::AbstractBufferOutput.
virtual void setOffset | ( | size32_t | of | ) | [pure virtual] |
Specify the offset of the next octet to write to the underlying WriteBuffer.
of | the offset of the next octet to write to the WriteBuffer |
IndexOutOfBoundsException | if of > getBuffer()->getMaximumCapacity() |
Implemented in AbstractWriteBuffer::AbstractBufferOutput.
virtual void write | ( | octet_t | b | ) | [pure virtual] |
Write the given octet.
b | the octet to write |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and DelegatingWriteBuffer::DelegatingBufferOutput.
Writes all the octets in the array vab
.
vab | the octet array to write |
IOException | if an I/O error occurs | |
NullPointerException | if vab is NULL |
Implemented in AbstractWriteBuffer::AbstractBufferOutput.
Writes cb
octets starting at offset of
from the array vab
.
vab | the octet array to write from | |
of | the offset into vab to start writing from | |
cb | the number of octets from vab to write |
IOException | if an I/O error occurs | |
NullPointerException | if vab is NULL | |
IndexOutOfBoundsException | if of+cb is greater than vab->length |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and DelegatingWriteBuffer::DelegatingBufferOutput.
virtual void writeBuffer | ( | ReadBuffer::View | vBuf | ) | [pure virtual] |
Write all the octets from the passed ReadBuffer object.
This is functionally equivalent to the following code:
getBuffer()->write(getOffset(), vBuf);
vBuf | a ReadBuffer object |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and DelegatingWriteBuffer::DelegatingBufferOutput.
virtual void writeBuffer | ( | ReadBuffer::View | vBuf, | |
size32_t | of, | |||
size32_t | cb | |||
) | [pure virtual] |
Write cb
octets from the passed ReadBuffer object starting at offset of
within the passed ReadBuffer.
This is functionally equivalent to the following code:
getBuffer()->write(getOffset(), vbuf, of, cb);
vBuf | a ReadBuffer object | |
of | the offset within the ReadBuffer of the first octet to write to this BufferOutput | |
cb | the number of octets to write |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and DelegatingWriteBuffer::DelegatingBufferOutput.
virtual void writeBoolean | ( | bool | f | ) | [pure virtual] |
Write a boolean value.
f | the bool to be written |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and DelegatingWriteBuffer::DelegatingBufferOutput.
virtual void writeChar16 | ( | wchar16_t | ch | ) | [pure virtual] |
Write a 16-bit Unicode character value.
ch | the Unicode character as a wchar16_t value |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, DelegatingWriteBuffer::DelegatingBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.
virtual void writeString | ( | String::View | vs | ) | [pure virtual] |
Write a sequence of UTF-8 encoded 16-bit Unicode characters.
vs | a String value to write; may be NULL |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.
virtual void writeInt16 | ( | int16_t | n | ) | [pure virtual] |
Write a 16-bit integer value.
n | the int16_t value to be written |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.
virtual void writeInt32 | ( | int32_t | n | ) | [pure virtual] |
Write a 32-bit integer value.
n | the int32_t value to be written |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.
virtual void writeInt64 | ( | int64_t | n | ) | [pure virtual] |
Write a 64-bit integer value.
n | the int64_t value to be written |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.
virtual void writeFloat32 | ( | float32_t | fl | ) | [pure virtual] |
Write a 32-bit floating-point value.
fl | the float32_t value to be written |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, DelegatingWriteBuffer::DelegatingBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.
virtual void writeFloat64 | ( | float64_t | dfl | ) | [pure virtual] |
Write a 64-bit floating-point value.
dfl | the float64_t value to be written |
IOException | if an I/O error occurs |
Implemented in AbstractWriteBuffer::AbstractBufferOutput, DelegatingWriteBuffer::DelegatingBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.