Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.3.0)

E80355-01

AbstractWriteBuffer::AbstractBufferOutput Class Reference

#include <coherence/io/AbstractWriteBuffer.hpp>

Inherits Object, and WriteBuffer::BufferOutput.

Inherited by DelegatingWriteBuffer::DelegatingBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.

List of all members.


Detailed Description

AbstractBufferOutput is a concrete implementation of BufferOutput for the non-concrete AbstractWriteBuffer implementation.

Author:
jh 2008.01.08

Public Types

typedef spec::Handle Handle
 AbstractBufferOutput Handle definition.
typedef spec::View View
 AbstractBufferOutput View definition.
typedef spec::Holder Holder
 AbstractBufferOutput Holder definition.

Public Member Functions

virtual
WriteBuffer::Handle 
getBuffer ()
 Get the WriteBuffer object that this BufferOutput is writing to.

Returns:
the underlying WriteBuffer object

virtual WriteBuffer::View getBuffer () const
 Get the WriteBuffer object that this BufferOutput is writing to.

Returns:
the underlying WriteBuffer object

virtual size32_t getOffset () const
 Determine the current offset of this BufferOutput within the underlying WriteBuffer.

Returns:
the offset of the next octet to write to the WriteBuffer

virtual void setOffset (size32_t of)
 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()

virtual void write (octet_t b)
 Write the given octet.

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

virtual void write (Array< octet_t >::View vab)
 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

virtual void write (Array< octet_t >::View vab, size32_t of, size32_t cb)
 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

virtual void writeBuffer (ReadBuffer::View vBuf)
 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

virtual void writeBuffer (ReadBuffer::View vBuf, size32_t of, size32_t cb)
 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

virtual void writeBoolean (bool f)
 Write a boolean value.

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

virtual void writeChar16 (wchar16_t ch)
 Write a 16-bit Unicode character value.

Parameters:
ch the Unicode character as a wchar16_t value
Exceptions:
IOException if an I/O error occurs

virtual void writeString (String::View vs)
 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

virtual void writeInt16 (int16_t n)
 Write a 16-bit integer value.

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

virtual void writeInt32 (int32_t n)
 Write a 32-bit integer value.

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

virtual void writeInt64 (int64_t n)
 Write a 64-bit integer value.

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

virtual void writeFloat32 (float32_t fl)
 Write a 32-bit floating-point value.

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

virtual void writeFloat64 (float64_t dfl)
 Write a 64-bit floating-point value.

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


Protected Member Functions

 AbstractBufferOutput (AbstractWriteBuffer::Handle hBuf)
 Create a new AbstractBufferOutput instance that delegates to the given AbstractWriteBuffer.

Protected Attributes

FinalHandle
< AbstractWriteBuffer
f_hBuf
 The delegate AbstractWriteBuffer.
size32_t m_ofWrite
 Current write offset within the AbstractWriteBuffer.

Constructor & Destructor Documentation

AbstractBufferOutput ( AbstractWriteBuffer::Handle  hBuf  )  [protected]

Create a new AbstractBufferOutput instance that delegates to the given AbstractWriteBuffer.

Parameters:
hBuf the delegate AbstractWriteBuffer


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