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

E69640-01

PofHelper Class Reference

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

Inherited by PofBufferReader, PofBufferWriter, and WritingPofHandler.

List of all members.


Detailed Description

Collection of helper methods for POF streams.

Author:
jh 2008.04.09
 

Public Types

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

Static Public Member Functions

static int32_t getClassTypeId (Object::View v, PofContext::View vCtx)
 Return an identifier that represents the C++ type of the specified object.
static int32_t getPofTypeId (Class::View vClass, PofContext::View vCtx)
 Return an indentifier that represents the POF type of the specified class.
static int32_t encodeTinyInt32 (int32_t n)
 Encode an int32_t value into one of the reserved single-byte combined type and value indicators.
static int32_t decodeTinyInt32 (int32_t n)
 Decode an int32_t value from one of the reserved single-byte combined type and value indicators.
static wchar16_t readAsChar16 (ReadBuffer::BufferInput::Handle hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to a wchar16_t.
static wchar16_t readAsChar16 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to a wchar16_t.
static int32_t readAsInt32 (ReadBuffer::BufferInput::Handle hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to an int32_t.
static int32_t readAsInt32 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to an int32_t.
static int64_t readAsInt64 (ReadBuffer::BufferInput::Handle hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to an int64_t.
static int64_t readAsInt64 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to an int64_t.
static float32_t readAsFloat32 (ReadBuffer::BufferInput::Handle hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to a float32_t.
static float32_t readAsFloat32 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to a float32_t.
static float64_t readAsFloat64 (ReadBuffer::BufferInput::Handle hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to a float64_t.
static float64_t readAsFloat64 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType)
 Read a value of the specified encoding from the POF stream and convert it to a float64_t.
static RawDate::View readRawDate (ReadBuffer::BufferInput::Handle hIn)
 Read a RawDate value from the passed BufferInput.
static RawDate::View readRawDate (FinalHandle< ReadBuffer::BufferInput > &hIn)
 Read a RawDate value from the passed BufferInput.
static RawTime::View readRawTime (ReadBuffer::BufferInput::Handle hIn)
 Read a RawTime value from the passed BufferInput.
static RawTime::View readRawTime (FinalHandle< ReadBuffer::BufferInput > &hIn)
 Read a RawTime value from the passed BufferInput.
static void skipValue (ReadBuffer::BufferInput::Handle hIn)
 Within the POF stream, skip the next POF value.
static void skipUniformValue (ReadBuffer::BufferInput::Handle hIn, int32_t nType)
 Within the POF stream, skip the next POF value of the specified type.
static void skipInts (ReadBuffer::BufferInput::Handle hIn, int32_t c)
 Skip the specified number of integers in the passed POF stream.
static size32_t validateIncomingSize (int32_t cElements)
 Validate that the specified POF collection size as read from a POF stream is smaller than the largest value of the size32_t type, and if so, return the given size as a size32_t.
static int32_t validateOutgoingSize (size32_t cElements)
 Validate that the specified Collection size is smaller than the largest value of the int32_t type, and if so, return the given size as an in32_t.
static void checkDate (int32_t nYear, int32_t nMonth, int32_t nDay)
 Validate date information.
static void checkTime (int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano)
 Validate time information.
static void checkTimeZone (int32_t nHourOffset, int32_t nMinuteOffset)
 Check the specified timezone offset.
static void checkTimeInterval (int32_t cHours, int32_t cMinutes, int32_t cSeconds, int32_t cNanos)
 Validate a time interval.
static void checkDayTimeInterval (int32_t cDays, int32_t cHours, int32_t cMinutes, int32_t cSeconds, int32_t cNanos)
 Validate a day-time interval.
static void checkYearMonthInterval (int32_t cYears, int32_t cMonths)
 Validate a year-month interval.
static String::View formatDate (int32_t nYear, int32_t nMonth, int32_t nDay)
 Format a date in the form YYYY-MM-DD.
static String::View formatTime (int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, bool fUTC)
 Format a time using the simplest applicable of the following formats:.
static String::View formatTime (int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, int32_t nHourOffset, int32_t nMinuteOffset)
 Format a time using the simplest applicable of the following formats:.
static void writeDate (WriteBuffer::BufferOutput::Handle hOut, int32_t nYear, int32_t nMonth, int32_t nDay)
 Write a date value to a BufferOutput object.
static void writeTime (WriteBuffer::BufferOutput::Handle hOut, int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, int32_t nTimeZoneType, int32_t nHourOffset, int32_t nMinuteOffset)
 Write a time value to a BufferOutput object.
static
ObjectArray::Handle 
resizeArray (ObjectArray::Handle haOld, size32_t cNew)
 Expand the passed array to contain the specified number of elements.
static Array< bool >
::Handle 
getEmptyBooleanArray ()
 
Returns:
an empty array of bool.
static Array
< octet_t >::Handle 
getEmptyOctetArray ()
 
Returns:
an empty array of octet_t.
static Array
< wchar16_t >
::Handle 
getEmptyChar16Array ()
 
Returns:
an empty array of wchar16_t.
static Array
< int16_t >::Handle 
getEmptyInt16Array ()
 
Returns:
an empty array of int16_t.
static Array
< int32_t >::Handle 
getEmptyInt32Array ()
 
Returns:
an empty array of int32_t.
static Array
< int64_t >::Handle 
getEmptyInt64Array ()
 
Returns:
an empty array of int64_t.
static Array
< float32_t >
::Handle 
getEmptyFloat32Array ()
 
Returns:
an empty array of float32_t.
static Array
< float64_t >
::Handle 
getEmptyFloat64Array ()
 
Returns:
an empty array of float64_t.
static
ObjectArray::Handle 
getEmptyObjectArray ()
 
Returns:
an empty array of objects.
static Binary::Handle getEmptyBinary ()
 A zero-length Binary.
static Collection::View getEmptyCollection ()
 
Returns:
an empty and immutable Collection.

Classes

class  ReadableEntrySetMap
 Map implementation backed by a List of Map.Entry objects. More...
class  WriteableEntrySetMap
 Immutable Map implementation backed by a Set of Map::Entry objects. More...

Member Function Documentation

static int32_t getClassTypeId ( Object::View  v,
    PofContext::View  vCtx 
  )    [static]

Return an identifier that represents the C++ type of the specified object.

Parameters:
 v an object to determine the type of
 vCtx the PofContext used to determine if the object is an instance of a valid user type; must not be NULL
Returns:
one of the PofConstants class C_* constants

static int32_t getPofTypeId ( Class::View  vClass,
    PofContext::View  vCtx 
  )    [static]

Return an indentifier that represents the POF type of the specified class.

Parameters:
 vClass the class; must not be NULL
 vCtx the PofContext used to determine the type identifier of a user type; must not be NULL
Returns:
one of the PofConstants class T_* constants
Exceptions:
 IllegalArgumentException if the user type associated with the given object is unknown to the specified PofContext

static int32_t encodeTinyInt32 ( int32_t  n  )  [static]

Encode an int32_t value into one of the reserved single-byte combined type and value indicators.

Parameters:
 n an int32_t between -1 and 22 inclusive
Returns:
the int32_t value that the int32_t is encoded as

static int32_t decodeTinyInt32 ( int32_t  n  )  [static]

Decode an int32_t value from one of the reserved single-byte combined type and value indicators.

Parameters:
 n the int32_t value that the int32_t is encoded as
Returns:
an int32_t between -1 and 22 inclusive

static wchar16_t readAsChar16 ( ReadBuffer::BufferInput::Handle  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to a wchar16_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as an char
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a char value

static wchar16_t readAsChar16 ( FinalHandle< ReadBuffer::BufferInput > &  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to a wchar16_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as an char
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a char value

static int32_t readAsInt32 ( ReadBuffer::BufferInput::Handle  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to an int32_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as an int32_t
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to an int32_t value

static int32_t readAsInt32 ( FinalHandle< ReadBuffer::BufferInput > &  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to an int32_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as an int32_t
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to an int32_t value

static int64_t readAsInt64 ( ReadBuffer::BufferInput::Handle  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to an int64_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as an int64_t
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to an int64_t value

static int64_t readAsInt64 ( FinalHandle< ReadBuffer::BufferInput > &  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to an int64_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as an int64_t
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to an int64_t value

static float32_t readAsFloat32 ( ReadBuffer::BufferInput::Handle  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to a float32_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as a float32_t
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a float32_t value

static float32_t readAsFloat32 ( FinalHandle< ReadBuffer::BufferInput > &  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to a float32_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as a float32_t
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a float32_t value

static float64_t readAsFloat64 ( ReadBuffer::BufferInput::Handle  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to a float64_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as a float64_t
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a float64_t value

static float64_t readAsFloat64 ( FinalHandle< ReadBuffer::BufferInput > &  hIn,
    int32_t  nType 
  )    [static]

Read a value of the specified encoding from the POF stream and convert it to a float64_t.

Parameters:
 hIn the POF stream containing the value
 nType the POF type of the value
Returns:
the POF value as a float64_t
Exceptions:
 IOException if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a float64_t value

static RawDate::View readRawDate ( ReadBuffer::BufferInput::Handle  hIn  )  [static]

Read a RawDate value from the passed BufferInput.

Parameters:
 hIn the BufferInput object to read from
Returns:
the RawDate value

static RawDate::View readRawDate ( FinalHandle< ReadBuffer::BufferInput > &  hIn  )  [static]

Read a RawDate value from the passed BufferInput.

Parameters:
 hIn the BufferInput object to read from
Returns:
the RawDate value

static RawTime::View readRawTime ( ReadBuffer::BufferInput::Handle  hIn  )  [static]

Read a RawTime value from the passed BufferInput.

Parameters:
 hIn the BufferInput object to read from
Returns:
the RawTime value

static RawTime::View readRawTime ( FinalHandle< ReadBuffer::BufferInput > &  hIn  )  [static]

Read a RawTime value from the passed BufferInput.

Parameters:
 hIn the BufferInput object to read from
Returns:
the RawTime value

static void skipValue ( ReadBuffer::BufferInput::Handle  hIn  )  [static]

Within the POF stream, skip the next POF value.

Parameters:
 hIn the BufferInput containing the POF stream

static void skipUniformValue ( ReadBuffer::BufferInput::Handle  hIn,
    int32_t  nType 
  )    [static]

Within the POF stream, skip the next POF value of the specified type.

Parameters:
 hIn the BufferInput containing the POF stream
 nType the type of the value to skip

static void skipInts ( ReadBuffer::BufferInput::Handle  hIn,
    int32_t  c 
  )    [static]

Skip the specified number of integers in the passed POF stream.

Parameters:
 hIn the BufferInput containing the POF stream
 c the number of integers to skip over

static size32_t validateIncomingSize ( int32_t  cElements  )  [inline, static]

Validate that the specified POF collection size as read from a POF stream is smaller than the largest value of the size32_t type, and if so, return the given size as a size32_t.

Parameters:
 cElements the POF collection size
Returns:
the POF collection size as a size32_t
Exceptions:
 Exception if the given POF collection size is greater than the largest value of the size32_t type

static int32_t validateOutgoingSize ( size32_t  cElements  )  [inline, static]

Validate that the specified Collection size is smaller than the largest value of the int32_t type, and if so, return the given size as an in32_t.

Parameters:
 cElements the Collection size
Returns:
the Collection size as a int32_t
Exceptions:
 Exception if the given Collection size is greater than the largest value of the int32_t type

static void checkDate ( int32_t  nYear,
    int32_t  nMonth,
    int32_t  nDay 
  )    [static]

Validate date information.

Parameters:
 nYear the year number
 nMonth the month number
 nDay the day number

static void checkTime ( int32_t  nHour,
    int32_t  nMinute,
    int32_t  nSecond,
    int32_t  nNano 
  )    [static]

Validate time information.

Parameters:
 nHour the hour number
 nMinute the minute number
 nSecond the second number
 nNano the nanosecond number

static void checkTimeZone ( int32_t  nHourOffset,
    int32_t  nMinuteOffset 
  )    [static]

Check the specified timezone offset.

Parameters:
 nHourOffset the hour offset
 nMinuteOffset the minute offset

static void checkTimeInterval ( int32_t  cHours,
    int32_t  cMinutes,
    int32_t  cSeconds,
    int32_t  cNanos 
  )    [static]

Validate a time interval.

Parameters:
 cHours the number of hours
 cMinutes the number of minutes
 cSeconds the number of seconds
 cNanos the number of nanoseconds

static void checkDayTimeInterval ( int32_t  cDays,
    int32_t  cHours,
    int32_t  cMinutes,
    int32_t  cSeconds,
    int32_t  cNanos 
  )    [static]

Validate a day-time interval.

See http://docs.oracle.com/cd/E16655_01/server.121/e17750/ch4datetime.htm#NLSPG004

Parameters:
 cDays the number of days
 cHours the number of hours
 cMinutes the number of minutes
 cSeconds the number of seconds
 cNanos the number of nanoseconds

static void checkYearMonthInterval ( int32_t  cYears,
    int32_t  cMonths 
  )    [static]

Validate a year-month interval.

Parameters:
 cYears the number of years
 cMonths the number of months

static String::View formatDate ( int32_t  nYear,
    int32_t  nMonth,
    int32_t  nDay 
  )    [static]

Format a date in the form YYYY-MM-DD.

Parameters:
 nYear the year number
 nMonth the month number
 nDay the day number

static String::View formatTime ( int32_t  nHour,
    int32_t  nMinute,
    int32_t  nSecond,
    int32_t  nNano,
    bool  fUTC 
  )    [static]

Format a time using the simplest applicable of the following formats:.

  1. HH:MM
  2. HH:MM:SS
  3. HH:MM:SS.MMM
  4. HH:MM:SS.NNNNNNNNN

Parameters:
 nHour the hour number
 nMinute the minute number
 nSecond the second number
 nNano the nanosecond number
 fUTC true for UTC, false for no time zone
Returns:
a time String

static String::View formatTime ( int32_t  nHour,
    int32_t  nMinute,
    int32_t  nSecond,
    int32_t  nNano,
    int32_t  nHourOffset,
    int32_t  nMinuteOffset 
  )    [static]

Format a time using the simplest applicable of the following formats:.

  1. HH:MM�HH:MM
  2. HH:MM:SS�HH:MM
  3. HH:MM:SS.MMM�HH:MM
  4. HH:MM:SS.NNNNNNNNN�HH:MM

Parameters:
 nHour the hour number
 nMinute the minute number
 nSecond the second number
 nNano the nanosecond number
 nHourOffset the timezone offset in hours
 nMinuteOffset the timezone offset in minutes
Returns:
a time String

static void writeDate ( WriteBuffer::BufferOutput::Handle  hOut,
    int32_t  nYear,
    int32_t  nMonth,
    int32_t  nDay 
  )    [static]

Write a date value to a BufferOutput object.

Parameters:
 hOut the BufferOutput to write to
 nYear the year number as defined by ISO8601
 nMonth the month number between 1 and 12 inclusive as defined by ISO8601
 nDay the day number between 1 and 31 inclusive as defined by ISO8601
Exceptions:
 IOException thrown if the passed BufferOutput object throws an IOException while the value is being written to it

static void writeTime ( WriteBuffer::BufferOutput::Handle  hOut,
    int32_t  nHour,
    int32_t  nMinute,
    int32_t  nSecond,
    int32_t  nNano,
    int32_t  nTimeZoneType,
    int32_t  nHourOffset,
    int32_t  nMinuteOffset 
  )    [static]

Write a time value to a BufferOutput object.

Parameters:
 hOut the BufferOutput to write to
 nHour the hour between 0 and 23 inclusive
 nMinute the minute value between 0 and 59 inclusive
 nSecond the second value between 0 and 59 inclusive (and theoretically 60 for a leap-second)
 nNano the nanosecond value between 0 and 999999999 inclusive
 nTimeZoneType 0 if the time value does not have an explicit time zone, 1 if the time value is UTC and 2 if the time zone has an explicit hour and minute offset
 nHourOffset the timezone offset in hours from UTC, for example 0 for BST, -5 for EST and 1 for CET
 nMinuteOffset the timezone offset in minutes, for example 0 (in most cases) or 30
Exceptions:
 IOException thrown if the passed BufferOutput object throws an IOException while the value is being written to it

static ObjectArray::Handle resizeArray ( ObjectArray::Handle  haOld,
    size32_t  cNew 
  )    [static]

Expand the passed array to contain the specified number of elements.

Parameters:
 haOld the "template" array or null
 cNew the number of desired elements in the new array
Returns:
the old array, if it was big enough, or a new array of the same type
Since:
Coherence 12.1.2


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