Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

PofReader Class Reference

#include <coherence/io/pof/PofReader.hpp>

Inherits Object.

Inherited by PofBufferReader [virtual].

List of all members.


Detailed Description

The PofReader interface provides the capability of reading a set of non-primitive types ("user types") from a POF stream as an ordered sequence of indexed properties.

See PofWriter for a complete description of the POF user type serialization format.

Author:
jh 2008.01.18
 

Public Types

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

Public Member Functions

virtual bool readBoolean (int32_t iProp)=0
 Read a boolean property from the POF stream.
virtual octet_t readOctet (int32_t iProp)=0
 Read an octet property from the POF stream.
virtual char16_t readChar16 (int32_t iProp)=0
 Read a 16-bit Unicode character property from the POF stream.
virtual int16_t readInt16 (int32_t iProp)=0
 Read a 16-bit integer property from the POF stream.
virtual int32_t readInt32 (int32_t iProp)=0
 Read a 32-bit integer property from the POF stream.
virtual int64_t readInt64 (int32_t iProp)=0
 Read a 64-bit integer property from the POF stream.
virtual float32_t readFloat32 (int32_t iProp)=0
 Read a a 32-bit floating-point property from the POF stream.
virtual float64_t readFloat64 (int32_t iProp)=0
 Read a 64-bit floating-point property from the POF stream.
virtual Array< bool >
::Handle 
readBooleanArray (int32_t iProp)=0
 Read a boolean array property from the POF stream.
virtual Array
< octet_t >::Handle 
readOctetArray (int32_t iProp)=0
 Read an octet array property from the POF stream.
virtual Array
< char16_t >::Handle 
readChar16Array (int32_t iProp)=0
 Read a 16-bit Unicode character array property from the POF stream.
virtual Array
< int16_t >::Handle 
readInt16Array (int32_t iProp)=0
 Read a 16-bit integer array property from the POF stream.
virtual Array
< int32_t >::Handle 
readInt32Array (int32_t iProp)=0
 Read a 32-bit integer array property from the POF stream.
virtual Array
< int64_t >::Handle 
readInt64Array (int32_t iProp)=0
 Read a 64-bit integer array property from the POF stream.
virtual Array
< float32_t >
::Handle 
readFloat32Array (int32_t iProp)=0
 Read a a 32-bit floating-point array property from the POF stream.
virtual Array
< float64_t >
::Handle 
readFloat64Array (int32_t iProp)=0
 Read a a 64-bit floating-point array property from the POF stream.
virtual Binary::View readBinary (int32_t iProp)=0
 Read a Binary property from the POF stream.
virtual String::View readString (int32_t iProp)=0
 Read a String property from the POF stream.
virtual RawDate::View readRawDate (int32_t iProp)=0
 Read a RawDate property from the POF stream.
virtual RawTime::View readRawTime (int32_t iProp)=0
 Read a RawTime property from the POF stream.
virtual RawDateTime::View readRawDateTime (int32_t iProp)=0
 Read a RawDateTime property from the POF stream.
virtual
RawYearMonthInterval::View 
readRawYearMonthInterval (int32_t iProp)=0
 Read a RawYearMonthInterval property from the POF stream.
virtual
RawTimeInterval::View 
readRawTimeInterval (int32_t iProp)=0
 Read a RawTimeInterval property from the POF stream.
virtual
RawDayTimeInterval::View 
readRawDayTimeInterval (int32_t iProp)=0
 Read a RawDayTimeInterval property from the POF stream.
virtual Object::Holder readObject (int32_t iProp)=0
 Read a property of any type, including a user type, from the POF stream.
virtual
ObjectArray::Handle 
readObjectArray (int32_t iProp)=0
 Read an ObjectArray property from the POF stream.
virtual LongArray::View readLongArray (int32_t iProp, LongArray::Handle hla=NULL)=0
 Read a LongArray of object values from the POF stream.
virtual Collection::View readCollection (int32_t iProp, Collection::Handle hCol=NULL)=0
 Read a Collection of object values from the POF stream.
virtual Map::View readMap (int32_t iProp, Map::Handle hMap=NULL)=0
 Read a Map of key/value pairs from the POF stream.
virtual PofContext::View getPofContext () const =0
 Return the PofContext object used by this PofReader to deserialize user types from a POF stream.
virtual void setPofContext (PofContext::View vCtx)=0
 Configure the PofContext object used by this PofReader to deserialize user types from a POF stream.
virtual int32_t getUserTypeId () const =0
 Determine the user type that is currently being parsed.
virtual int32_t getVersionId () const =0
 Determine the version identifier of the user type that is currently being parsed.
virtual void registerIdentity (Object::Holder oh)=0
 Register an identity for a newly created user type instance.
virtual PofReader::Handle createNestedPofReader (int32_t iProp)=0
 Obtain a PofReader that can be used to read a set of properties from a single property of the current user type.
virtual Binary::View readRemainder ()=0
 Read all remaining indexed properties of the current user type from the POF stream.

Member Function Documentation

virtual bool readBoolean ( int32_t  iProp  )  [pure virtual]

Read a boolean property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the bool property value
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual octet_t readOctet ( int32_t  iProp  )  [pure virtual]

Read an octet property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the octet_t property value
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual char16_t readChar16 ( int32_t  iProp  )  [pure virtual]

Read a 16-bit Unicode character property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the 16-bit Unicode character property value as a char16_t value
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual int16_t readInt16 ( int32_t  iProp  )  [pure virtual]

Read a 16-bit integer property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the int16_t property value
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual int32_t readInt32 ( int32_t  iProp  )  [pure virtual]

Read a 32-bit integer property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the int32_t property value
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual int64_t readInt64 ( int32_t  iProp  )  [pure virtual]

Read a 64-bit integer property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the int64_t property value
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual float32_t readFloat32 ( int32_t  iProp  )  [pure virtual]

Read a a 32-bit floating-point property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the float32_t property value
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual float64_t readFloat64 ( int32_t  iProp  )  [pure virtual]

Read a 64-bit floating-point property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the float64_t property value
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Array<bool>::Handle readBooleanArray ( int32_t  iProp  )  [pure virtual]

Read a boolean array property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the bool array property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Array<octet_t>::Handle readOctetArray ( int32_t  iProp  )  [pure virtual]

Read an octet array property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the octet_t array property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Array<char16_t>::Handle readChar16Array ( int32_t  iProp  )  [pure virtual]

Read a 16-bit Unicode character array property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the char16_t array property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Array<int16_t>::Handle readInt16Array ( int32_t  iProp  )  [pure virtual]

Read a 16-bit integer array property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the int16_t array property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Array<int32_t>::Handle readInt32Array ( int32_t  iProp  )  [pure virtual]

Read a 32-bit integer array property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the int32_t array property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Array<int64_t>::Handle readInt64Array ( int32_t  iProp  )  [pure virtual]

Read a 64-bit integer array property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the int64_t array property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Array<float32_t>::Handle readFloat32Array ( int32_t  iProp  )  [pure virtual]

Read a a 32-bit floating-point array property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the float32_t array property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Array<float64_t>::Handle readFloat64Array ( int32_t  iProp  )  [pure virtual]

Read a a 64-bit floating-point array property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the float64_t array property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Binary::View readBinary ( int32_t  iProp  )  [pure virtual]

Read a Binary property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the Binary property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual String::View readString ( int32_t  iProp  )  [pure virtual]

Read a String property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the String property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual RawDate::View readRawDate ( int32_t  iProp  )  [pure virtual]

Read a RawDate property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the RawDate property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual RawTime::View readRawTime ( int32_t  iProp  )  [pure virtual]

Read a RawTime property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the RawTime property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual RawDateTime::View readRawDateTime ( int32_t  iProp  )  [pure virtual]

Read a RawDateTime property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the RawDateTime property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual RawYearMonthInterval::View readRawYearMonthInterval ( int32_t  iProp  )  [pure virtual]

Read a RawYearMonthInterval property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the RawYearMonthInterval property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual RawTimeInterval::View readRawTimeInterval ( int32_t  iProp  )  [pure virtual]

Read a RawTimeInterval property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the RawTimeInterval property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual RawDayTimeInterval::View readRawDayTimeInterval ( int32_t  iProp  )  [pure virtual]

Read a RawDayTimeInterval property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the RawDayTimeInterval property value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Object::Holder readObject ( int32_t  iProp  )  [pure virtual]

Read a property of any type, including a user type, from the POF stream.

Parameters:
 iProp the property index to read
Returns:
the Object value, or NULL if no value was available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual ObjectArray::Handle readObjectArray ( int32_t  iProp  )  [pure virtual]

Read an ObjectArray property from the POF stream.

Parameters:
 iProp the property index to read
Returns:
an ObjectArray of object values, or NULL if no ObjectArray is passed and there is no array data in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual LongArray::View readLongArray ( int32_t  iProp,
    LongArray::Handle  hla = NULL 
  )    [pure virtual]

Read a LongArray of object values from the POF stream.

Parameters:
 iProp the property index to read
 hla the optional LongArray to use to store the values; may be NULL
Returns:
a LongArray of object values, or NULL if no LongArray is passed and there is no key/value data available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Collection::View readCollection ( int32_t  iProp,
    Collection::Handle  hCol = NULL 
  )    [pure virtual]

Read a Collection of object values from the POF stream.

Parameters:
 iProp the property index to read
 hCol the optional Collection to use to store the values; may be NULL
Returns:
a Collection of object values, or NULL if no Collection is passed and there is no collection data available in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual Map::View readMap ( int32_t  iProp,
    Map::Handle  hMap = NULL 
  )    [pure virtual]

Read a Map of key/value pairs from the POF stream.

Parameters:
 iProp the property index to read
 hMap the optional Map to initialize; the handle may be NULL
Returns:
a Map of key/value pairs, or NULL if no Map is passed and there is no key/value data in the POF stream
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader.

virtual PofContext::View getPofContext (  )  const [pure virtual]

Return the PofContext object used by this PofReader to deserialize user types from a POF stream.

Returns:
the PofContext object that contains user type meta-data

Implemented in PofBufferReader.

virtual void setPofContext ( PofContext::View  vCtx  )  [pure virtual]

Configure the PofContext object used by this PofReader to deserialize user types from a POF stream.

Note: this is an advanced method that should be used with care. For example, if this method is being used to switch to another PofContext mid-POF stream, it is important to eventually restore the original PofContext. For example:

 PofContext::View vCtxOrig = hReader->getPofContext();

 // switch to another PofContext
 PofContext::View vCtxNew = ...;
 hReader->setContext(vCtxNew);

 // read POF data using the reader
 ...

 // restore the original PofContext
 hReader->setPofContext(vCtxOrig);
 

Parameters:
 vCtx the new PofContext; must not be NULL

Implemented in PofBufferReader.

virtual int32_t getUserTypeId (  )  const [pure virtual]

Determine the user type that is currently being parsed.

Returns:
the user type information, or -1 if the PofReader is not currently parsing a user type

Implemented in PofBufferReader, and UserTypeReader.

virtual int32_t getVersionId (  )  const [pure virtual]

Determine the version identifier of the user type that is currently being parsed.

Returns:
the integer version ID read from the POF stream; always non-negative
Exceptions:
 coherence::lang::IllegalStateException if no user type is being parsed

Implemented in PofBufferReader, and UserTypeReader.

virtual void registerIdentity ( Object::Holder  oh  )  [pure virtual]

Register an identity for a newly created user type instance.

If identity/reference types are enabled, an identity is used to uniquely identify a user type instance within a POF stream. The identity immediately proceeds the instance value in the POF stream and can be used later in the stream to reference the instance.

PofSerializer implementations must call this method with the user type instance instantiated during deserialization prior to reading any properties of the instance which are user type instances themselves.

Parameters:
 oh the object to register the identity for
See also:
PofSerializer::deserialize(PofReaderHandle)
Since:
Coherence 3.7.1

Implemented in PofBufferReader, and UserTypeReader.

virtual PofReader::Handle createNestedPofReader ( int32_t  iProp  )  [pure virtual]

Obtain a PofReader that can be used to read a set of properties from a single property of the current user type.

The returned PofReader is only valid from the time that it is returned until the next call is made to this PofReader.

Parameters:
 iProp the property index to read from
Returns:
a PofReader that reads its contents from a single property of this PofReader
Exceptions:
 coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream
 coherence::lang::IllegalStateException if no user type is being parsed
 coherence::io::IOException if an I/O error occurs
Since:
Coherence 3.6

Implemented in PofBufferReader, and UserTypeReader.

virtual Binary::View readRemainder (  )  [pure virtual]

Read all remaining indexed properties of the current user type from the POF stream.

As part of reading in a user type, this method must be called by the PofSerializer that is reading the user type, or the read position within the POF stream will be corrupted.

Subsequent calls to the various readXYZ methods of this interface will fail after this method is called.

Returns:
a buffer containing zero or more indexed properties in binary POF encoded form
Exceptions:
 coherence::lang::IllegalStateException if no user type is being parsed
 coherence::io::IOException if an I/O error occurs

Implemented in PofBufferReader, and UserTypeReader.


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