Oracle Coherence for C++ API
Release 3.6.1.0

E18813-01

WriteBuffer::BufferOutput Class Reference

#include <coherence/io/WriteBuffer.hpp>

Inherits Object.

Inherited by AbstractWriteBuffer::AbstractBufferOutput [virtual].

List of all members.


Detailed Description

The BufferOutput interface represents a data output stream on top of a WriteBuffer.
Author:
jh 2007.12.20

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 (char16_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.

Member Function Documentation

virtual WriteBuffer::Handle getBuffer (  )  [pure virtual]

Get the WriteBuffer object that this BufferOutput is writing to.

Returns:
the underlying WriteBuffer object

Implemented in AbstractWriteBuffer::AbstractBufferOutput.

virtual WriteBuffer::View getBuffer (  )  const [pure virtual]

Get the WriteBuffer object that this BufferOutput is writing to.

Returns:
the underlying WriteBuffer object

Implemented in AbstractWriteBuffer::AbstractBufferOutput.

virtual size32_t getOffset (  )  const [pure virtual]

Determine the current offset of this BufferOutput within the underlying WriteBuffer.

Returns:
the offset of the next octet to write to the 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.

Parameters:
of  the offset of the next octet to write to the WriteBuffer
Exceptions:
IndexOutOfBoundsException  if of > getBuffer()->getMaximumCapacity()

Implemented in AbstractWriteBuffer::AbstractBufferOutput.

virtual void write ( octet_t  b  )  [pure virtual]

Write the given octet.

Parameters:
b  the octet to write
Exceptions:
IOException  if an I/O error occurs

Implemented in AbstractWriteBuffer::AbstractBufferOutput, and DelegatingWriteBuffer::DelegatingBufferOutput.

virtual void write ( Array< octet_t >::View  vab  )  [pure virtual]

Writes all the octets in the array vab.

Parameters:
vab  the octet array to write
Exceptions:
IOException  if an I/O error occurs
NullPointerException  if vab is NULL

Implemented in AbstractWriteBuffer::AbstractBufferOutput.

virtual void write ( Array< octet_t >::View  vab,
size32_t  of,
size32_t  cb  
) [pure virtual]

Writes cb octets starting at offset of from the array vab.

Parameters:
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
Exceptions:
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);
 
Parameters:
vBuf  a ReadBuffer object
Exceptions:
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);
 
Parameters:
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
Exceptions:
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.

Parameters:
f  the bool to be written
Exceptions:
IOException  if an I/O error occurs

Implemented in AbstractWriteBuffer::AbstractBufferOutput, and DelegatingWriteBuffer::DelegatingBufferOutput.

virtual void writeChar16 ( char16_t  ch  )  [pure virtual]

Write a 16-bit Unicode character value.

Parameters:
ch  the Unicode character as a char16_t value
Exceptions:
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.

Parameters:
vs  a String value to write; may be NULL
Exceptions:
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.

Parameters:
n  the int16_t value to be written
Exceptions:
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.

Parameters:
n  the int32_t value to be written
Exceptions:
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.

Parameters:
n  the int64_t value to be written
Exceptions:
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.

Parameters:
fl  the float32_t value to be written
Exceptions:
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.

Parameters:
dfl  the float64_t value to be written
Exceptions:
IOException  if an I/O error occurs

Implemented in AbstractWriteBuffer::AbstractBufferOutput, DelegatingWriteBuffer::DelegatingBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.


The documentation for this class was generated from the following file:
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.