public class WritingPofHandler extends PofHelper implements PofHandler
Modifier and Type | Class and Description |
---|---|
static class |
WritingPofHandler.Complex
A Complex object represents the current complex data structure in the
POF stream.
|
static class |
WritingPofHandler.ComplexMap
A ComplexMap object represents a map data structure (with uniform keys
or with uniform keys and values) in the POF stream.
|
PofHelper.ReadableEntrySetMap, PofHelper.WriteableEntrySetMap
Base.LoggingWriter, Base.StackFrame
BIGDECIMAL_ZERO, BIGINTEGER_MAX_LONG, BIGINTEGER_MIN_LONG, BINARY_EMPTY, BOOLEAN_ARRAY_EMPTY, BYTE_ARRAY_EMPTY, CHAR_ARRAY_EMPTY, COLLECTION_EMPTY, DOUBLE_ARRAY_EMPTY, FLOAT_ARRAY_EMPTY, INT_ARRAY_EMPTY, LONG_ARRAY_EMPTY, OBJECT_ARRAY_EMPTY, SHORT_ARRAY_EMPTY
LOG_ALWAYS, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_MAX, LOG_MIN, LOG_QUIET, LOG_WARN, POWER_0, POWER_G, POWER_K, POWER_M, POWER_T, UNIT_D, UNIT_H, UNIT_M, UNIT_MS, UNIT_NS, UNIT_S, UNIT_US
J_BIG_DECIMAL, J_BIG_INTEGER, J_BINARY, J_BOOLEAN, J_BOOLEAN_ARRAY, J_BYTE, J_BYTE_ARRAY, J_CHAR_ARRAY, J_CHARACTER, J_COLLECTION, J_DATE, J_DATETIME, J_DOUBLE, J_DOUBLE_ARRAY, J_FLOAT, J_FLOAT_ARRAY, J_INT_ARRAY, J_INTEGER, J_LOCAL_DATE, J_LOCAL_DATETIME, J_LOCAL_TIME, J_LONG, J_LONG_ARRAY, J_MAP, J_NULL, J_OBJECT_ARRAY, J_OFFSET_DATETIME, J_OFFSET_TIME, J_QUAD, J_RAW_DATE, J_RAW_DATETIME, J_RAW_DAY_TIME_INTERVAL, J_RAW_TIME, J_RAW_TIME_INTERVAL, J_RAW_YEAR_MONTH_INTERVAL, J_SHORT, J_SHORT_ARRAY, J_SPARSE_ARRAY, J_STRING, J_TIME, J_TIMESTAMP, J_USER_TYPE, J_ZONED_DATETIME, MAX_DECIMAL128_SCALE, MAX_DECIMAL128_UNSCALED, MAX_DECIMAL32_SCALE, MAX_DECIMAL32_UNSCALED, MAX_DECIMAL64_SCALE, MAX_DECIMAL64_UNSCALED, MIN_DECIMAL128_SCALE, MIN_DECIMAL32_SCALE, MIN_DECIMAL64_SCALE, T_ARRAY, T_BOOLEAN, T_CHAR, T_CHAR_STRING, T_COLLECTION, T_DATE, T_DATETIME, T_DAY_TIME_INTERVAL, T_DECIMAL128, T_DECIMAL32, T_DECIMAL64, T_FLOAT128, T_FLOAT32, T_FLOAT64, T_IDENTITY, T_INT128, T_INT16, T_INT32, T_INT64, T_MAP, T_OCTET, T_OCTET_STRING, T_REFERENCE, T_SPARSE_ARRAY, T_TIME, T_TIME_INTERVAL, T_UNIFORM_ARRAY, T_UNIFORM_COLLECTION, T_UNIFORM_KEYS_MAP, T_UNIFORM_MAP, T_UNIFORM_SPARSE_ARRAY, T_UNKNOWN, T_YEAR_MONTH_INTERVAL, V_BOOLEAN_FALSE, V_BOOLEAN_TRUE, V_COLLECTION_EMPTY, V_FP_NAN, V_FP_NEG_INFINITY, V_FP_POS_INFINITY, V_INT_0, V_INT_1, V_INT_10, V_INT_11, V_INT_12, V_INT_13, V_INT_14, V_INT_15, V_INT_16, V_INT_17, V_INT_18, V_INT_19, V_INT_2, V_INT_20, V_INT_21, V_INT_22, V_INT_3, V_INT_4, V_INT_5, V_INT_6, V_INT_7, V_INT_8, V_INT_9, V_INT_NEG_1, V_REFERENCE_NULL, V_STRING_ZERO_LENGTH
Constructor and Description |
---|
WritingPofHandler(WriteBuffer.BufferOutput out)
Construct a Writing POF Handler that will write a POF stream to the
passed BufferOutput object.
|
Modifier and Type | Method and Description |
---|---|
void |
beginArray(int iPos,
int cElements)
Report that an array of values has been encountered in the POF stream.
|
void |
beginCollection(int iPos,
int cElements)
Report that a collection of values has been encountered in the POF
stream.
|
void |
beginMap(int iPos,
int cElements)
Report that a map of key/value pairs has been encountered in the POF
stream.
|
void |
beginSparseArray(int iPos,
int cElements)
Report that a sparse array of values has been encountered in the POF
stream.
|
void |
beginUniformArray(int iPos,
int cElements,
int nType)
Report that a uniform array of values has been encountered in the POF
stream.
|
void |
beginUniformCollection(int iPos,
int cElements,
int nType)
Report that a uniform collection of values has been encountered in the
POF stream.
|
void |
beginUniformKeysMap(int iPos,
int cElements,
int nTypeKeys)
Report that a map of key/value pairs (with the keys being of a uniform
type) has been encountered in the POF stream.
|
void |
beginUniformMap(int iPos,
int cElements,
int nTypeKeys,
int nTypeValues)
Report that a map of key/value pairs (with the keys being of a uniform
type and the values being of a uniform type) has been encountered in
the POF stream.
|
void |
beginUniformSparseArray(int iPos,
int cElements,
int nType)
Report that a uniform sparse array of values has been encountered in
the POF stream.
|
void |
beginUserType(int iPos,
int nUserTypeId,
int nVersionId)
Report that a value of a "user type" has been encountered in the POF
stream.
|
void |
beginUserType(int iPos,
int nId,
int nUserTypeId,
int nVersionId)
Report that a value of a "user type" has been encountered in the POF
stream.
|
protected void |
encodePosition(int iPos)
Called for each and every value going into the POF stream, in case the
value needs its position to be encoded into the stream.
|
void |
endComplexValue()
Signifies the termination of the current complex value.
|
WriteBuffer.BufferOutput |
getBufferOutput()
Obtain the DataOutput object that this Writing POF Handler is writing
to.
|
protected WritingPofHandler.Complex |
getComplex()
Obtain the current Complex object that represents the complex type that
is being written to the POF stream.
|
protected boolean |
isCompressable()
Determine if the value encoding can be compressed by combining type and
value information in such a way that type information could be lost.
|
protected boolean |
isSkippable()
Determine if the value encoding can be skipped.
|
protected boolean |
isTypeIdEncoded(int nTypeId)
Determine if the type should be encoded for the current value.
|
void |
onBoolean(int iPos,
boolean f)
Report that a boolean value has been encountered in the POF stream.
|
void |
onChar(int iPos,
char ch)
Report that a character value has been encountered in the POF stream.
|
void |
onCharString(int iPos,
String s)
Report that a character string value has been encountered in the POF
stream.
|
void |
onDate(int iPos,
int nYear,
int nMonth,
int nDay)
Report that a date value has been encountered in the POF stream.
|
void |
onDateTime(int iPos,
int nYear,
int nMonth,
int nDay,
int nHour,
int nMinute,
int nSecond,
int nNano,
boolean fUTC)
Report that a date-time value has been encountered in the POF stream.
|
void |
onDateTime(int iPos,
int nYear,
int nMonth,
int nDay,
int nHour,
int nMinute,
int nSecond,
int nNano,
int nHourOffset,
int nMinuteOffset)
Report that a date-time value (with a timezone offset) has been
encountered in the POF stream.
|
void |
onDayTimeInterval(int iPos,
int cDays,
int cHours,
int cMinutes,
int cSeconds,
int cNanos)
Report that a day-time interval value has been encountered in the POF
stream.
|
void |
onDecimal128(int iPos,
BigDecimal dec)
Report that a quad-precision decimal value (a base-10 floating point)
has been encountered in the POF stream.
|
void |
onDecimal32(int iPos,
BigDecimal dec)
Report that a single-precision decimal value (a base-10 floating point)
has been encountered in the POF stream.
|
void |
onDecimal64(int iPos,
BigDecimal dec)
Report that a double-precision decimal value (a base-10 floating point)
has been encountered in the POF stream.
|
void |
onFloat128(int iPos,
RawQuad qfl)
Report that a base-2 quad-precision floating point value has been
encountered in the POF stream.
|
void |
onFloat32(int iPos,
float fl)
Report that a base-2 single-precision floating point value has been
encountered in the POF stream.
|
void |
onFloat64(int iPos,
double dfl)
Report that a base-2 double-precision floating point value has been
encountered in the POF stream.
|
void |
onIdentityReference(int iPos,
int nId)
Specifies that a reference to a previously-identified value has been
encountered in the POF stream.
|
void |
onInt128(int iPos,
BigInteger n)
Report that a 128-bit integer value has been encountered in the POF
stream.
|
void |
onInt16(int iPos,
short n)
Report that a short integer value has been encountered in the POF
stream.
|
void |
onInt32(int iPos,
int n)
Report that an integer value has been encountered in the POF stream.
|
void |
onInt64(int iPos,
long n)
Report that a long integer value has been encountered in the POF
stream.
|
void |
onNullReference(int iPos)
Specifies that a null value has been encountered in the POF stream.
|
void |
onOctet(int iPos,
int b)
Report that an octet value (a byte) has been encountered in the POF
stream.
|
void |
onOctetString(int iPos,
Binary bin)
Report that a octet string value has been encountered in the POF
stream.
|
void |
onTime(int iPos,
int nHour,
int nMinute,
int nSecond,
int nNano,
boolean fUTC)
Report that a time value has been encountered in the POF stream.
|
void |
onTime(int iPos,
int nHour,
int nMinute,
int nSecond,
int nNano,
int nHourOffset,
int nMinuteOffset)
Report that a time value (with a timezone offset) has been encountered
in the POF stream.
|
void |
onTimeInterval(int iPos,
int cHours,
int cMinutes,
int cSeconds,
int cNanos)
Report that a time interval value has been encountered in the POF
stream.
|
void |
onYearMonthInterval(int iPos,
int cYears,
int cMonths)
Report that a year-month interval value has been encountered in the POF
stream.
|
void |
registerIdentity(int nId)
This method is invoked when an identity is encountered in the POF
stream.
|
calcDecimalSize, checkDate, checkDayTimeInterval, checkDecimalRange, checkElementCount, checkReferenceRange, checkTime, checkTimeInterval, checkTimeZone, checkType, checkYearMonthInterval, convertNumber, convertToDate, decodeTinyInt, encodeTinyInt, formatDate, formatTime, formatTime, getJavaTypeId, getPofTypeId, isIntrinsicPofType, readAsBigDecimal, readAsBigInteger, readAsChar, readAsDouble, readAsFloat, readAsInt, readAsLong, readAsQuad, readBigDecimal, readBigInteger, readChar, readLocalDate, readLocalDateTime, readLocalTime, readOffsetDateTime, readOffsetTime, readQuad, readRawDate, readRawTime, resizeArray, skipPackedInts, skipUniformValue, skipValue, writeBigDecimal, writeBigInteger, writeDate, writeTime
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
public WritingPofHandler(WriteBuffer.BufferOutput out)
out
- the BufferOutput to write topublic void registerIdentity(int nId)
PofHandler.onIdentityReference(int, int)
method.registerIdentity
in interface PofHandler
nId
- if (nId >= 0), then this is the identity
encountered in the POF stream, otherwise it is an indicator
that the following value could have been assigned an
identifier but was not (i.e. that the subsequent value is
of a referenceable data type)public void onNullReference(int iPos)
onNullReference
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisepublic void onIdentityReference(int iPos, int nId)
onIdentityReference
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisenId
- the identity of the previously encountered value, as was
specified in a previous call to PofHandler.registerIdentity(int)
public void onInt16(int iPos, short n)
onInt16
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisen
- the integer value as a shortpublic void onInt32(int iPos, int n)
onInt32
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisen
- the integer value as an intpublic void onInt64(int iPos, long n)
onInt64
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisen
- the integer value as a longpublic void onInt128(int iPos, BigInteger n)
onInt128
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisen
- the integer value as a BigIntegerpublic void onFloat32(int iPos, float fl)
onFloat32
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisefl
- the floating point value as a floatpublic void onFloat64(int iPos, double dfl)
onFloat64
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisedfl
- the floating point value as a doublepublic void onFloat128(int iPos, RawQuad qfl)
onFloat128
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwiseqfl
- the floating point value as a quadpublic void onDecimal32(int iPos, BigDecimal dec)
onDecimal32
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisedec
- the decimal value as a BigDecimalpublic void onDecimal64(int iPos, BigDecimal dec)
onDecimal64
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisedec
- the decimal value as a BigDecimalpublic void onDecimal128(int iPos, BigDecimal dec)
onDecimal128
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisedec
- the decimal value as a BigDecimalpublic void onBoolean(int iPos, boolean f)
onBoolean
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisef
- the boolean valuepublic void onOctet(int iPos, int b)
onOctet
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwiseb
- the octet value as an int whose value is in the range 0 to
255 (0x00-0xFF) inclusivepublic void onOctetString(int iPos, Binary bin)
onOctetString
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisebin
- the octet string value as a Binary objectpublic void onChar(int iPos, char ch)
onChar
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisech
- the character value as a charpublic void onCharString(int iPos, String s)
onCharString
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwises
- the character string value as a String objectpublic void onDate(int iPos, int nYear, int nMonth, int nDay)
onDate
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisenYear
- the year number as defined by ISO8601; note the
difference with the Java Date class, whose year is
relative to 1900nMonth
- the month number between 1 and 12 inclusive as defined
by ISO8601; note the difference from the Java Date
class, whose month value is 0-based (0-11)nDay
- the day number between 1 and 31 inclusive as defined by
ISO8601public void onYearMonthInterval(int iPos, int cYears, int cMonths)
onYearMonthInterval
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisecYears
- the number of years in the year-month intervalcMonths
- the number of months in the year-month intervalpublic void onTime(int iPos, int nHour, int nMinute, int nSecond, int nNano, boolean fUTC)
onTime
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisenHour
- the hour between 0 and 23 inclusivenMinute
- the minute value between 0 and 59 inclusivenSecond
- the second value between 0 and 59 inclusive (and
theoretically 60 for a leap-second)nNano
- the nanosecond value between 0 and 999999999 inclusivefUTC
- true if the time value is UTC or false if the time value
does not have an explicit time zonepublic void onTime(int iPos, int nHour, int nMinute, int nSecond, int nNano, int nHourOffset, int nMinuteOffset)
onTime
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisenHour
- the hour between 0 and 23 inclusivenMinute
- the minute value between 0 and 59 inclusivenSecond
- the second value between 0 and 59 inclusive (and
theoretically 60 for a leap-second)nNano
- the nanosecond value between 0 and 999999999
inclusivenHourOffset
- the timezone offset in hours from UTC, for example
0 for BST, -5 for EST and 1 for CETnMinuteOffset
- the timezone offset in minutes, for example 0 (in
most cases) or 30public void onTimeInterval(int iPos, int cHours, int cMinutes, int cSeconds, int cNanos)
onTimeInterval
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array,
element counter within a collection, entry counter
within a map, -1 otherwisecHours
- the number of hours in the time intervalcMinutes
- the number of minutes in the time interval, from 0 to
59 inclusivecSeconds
- the number of seconds in the time interval, from 0 to
59 inclusivecNanos
- the number of nanoseconds, from 0 to 999999999
inclusivepublic void onDateTime(int iPos, int nYear, int nMonth, int nDay, int nHour, int nMinute, int nSecond, int nNano, boolean fUTC)
onDateTime
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array, element
counter within a collection, entry counter within a map,
-1 otherwisenYear
- the year number as defined by ISO8601; note the
difference with the Java Date class, whose year is
relative to 1900nMonth
- the month number between 1 and 12 inclusive as defined
by ISO8601; note the difference from the Java Date
class, whose month value is 0-based (0-11)nDay
- the day number between 1 and 31 inclusive as defined by
ISO8601nHour
- the hour between 0 and 23 inclusivenMinute
- the minute value between 0 and 59 inclusivenSecond
- the second value between 0 and 59 inclusive (and
theoretically 60 for a leap-second)nNano
- the nanosecond value between 0 and 999999999 inclusivefUTC
- true if the time value is UTC or false if the time value
does not have an explicit time zonepublic void onDateTime(int iPos, int nYear, int nMonth, int nDay, int nHour, int nMinute, int nSecond, int nNano, int nHourOffset, int nMinuteOffset)
onDateTime
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisenYear
- the year number as defined by ISO8601; note the
difference with the Java Date class, whose year is
relative to 1900nMonth
- the month number between 1 and 12 inclusive as
defined by ISO8601; note the difference from the
Java Date class, whose month value is 0-based
(0-11)nDay
- the day number between 1 and 31 inclusive as
defined by ISO8601nHour
- the hour between 0 and 23 inclusivenMinute
- the minute value between 0 and 59 inclusivenSecond
- the second value between 0 and 59 inclusive (and
theoretically 60 for a leap-second)nNano
- the nanosecond value between 0 and 999999999
inclusivenHourOffset
- the timezone offset in hours from UTC, for example
0 for BST, -5 for EST and 1 for CETnMinuteOffset
- the timezone offset in minutes, for example 0 (in
most cases) or 30public void onDayTimeInterval(int iPos, int cDays, int cHours, int cMinutes, int cSeconds, int cNanos)
onDayTimeInterval
in interface PofHandler
iPos
- context-sensitive position information: property index
within a user type, array index within an array,
element counter within a collection, entry counter
within a map, -1 otherwisecDays
- the number of days in the day-time intervalcHours
- the number of hours in the day-time interval, from 0
to 23 inclusivecMinutes
- the number of minutes in the day-time interval, from 0
to 59 inclusivecSeconds
- the number of seconds in the day-time interval, from 0
to 59 inclusivecNanos
- the number of nanoseconds in the day-time interval,
from 0 to 999999999 inclusivepublic void beginCollection(int iPos, int cElements)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the cElements elements in the
collection, and the collection extent will then be terminated by a call
to PofHandler.endComplexValue()
.
beginCollection
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of values (elements) in the
collectionpublic void beginUniformCollection(int iPos, int cElements, int nType)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the cElements elements in the
collection, and the collection extent will then be terminated by a call
to PofHandler.endComplexValue()
.
beginUniformCollection
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of values (elements) in the
collectionnType
- the type identifier for all of the values in the
uniform collectionpublic void beginArray(int iPos, int cElements)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the cElements elements in the
array, and the array extent will then be terminated by a call to
PofHandler.endComplexValue()
.
beginArray
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of values (elements) in the arraypublic void beginUniformArray(int iPos, int cElements, int nType)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the cElements elements in the
array, and the array extent will then be terminated by a call to
PofHandler.endComplexValue()
.
beginUniformArray
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of values (elements) in the arraynType
- the type identifier for all of the values in the
uniform arraypublic void beginSparseArray(int iPos, int cElements)
This method call will be followed by a separate call to an "on" or
"begin" method for present element in the sparse array (up to
cElements elements), and the array extent will then be
terminated by a call to PofHandler.endComplexValue()
.
beginSparseArray
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of elements in the array, which is
greater than or equal to the number of values in the
sparse POF stream; in other words, the number of
values that will subsequently be reported will not
exceed this numberpublic void beginUniformSparseArray(int iPos, int cElements, int nType)
This method call will be followed by a separate call to an "on" or
"begin" method for present element in the sparse array (up to
cElements elements), and the array extent will then be
terminated by a call to PofHandler.endComplexValue()
.
beginUniformSparseArray
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of elements in the array, which is
greater than or equal to the number of values in the
sparse POF stream; in other words, the number of
values that will subsequently be reported will not
exceed this numbernType
- the type identifier for all of the values in the
uniform sparse arraypublic void beginMap(int iPos, int cElements)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the cElements elements in the
map, and the map extent will then be terminated by a call to
PofHandler.endComplexValue()
.
beginMap
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of key/value pairs (entries) in the
mappublic void beginUniformKeysMap(int iPos, int cElements, int nTypeKeys)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the cElements elements in the
map, and the map extent will then be terminated by a call to
PofHandler.endComplexValue()
.
beginUniformKeysMap
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of key/value pairs (entries) in the
mapnTypeKeys
- the type identifier for all of the keys in the
uniform-keys mappublic void beginUniformMap(int iPos, int cElements, int nTypeKeys, int nTypeValues)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the cElements elements in the
map, and the map extent will then be terminated by a call to
PofHandler.endComplexValue()
.
beginUniformMap
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisecElements
- the exact number of key/value pairs (entries) in
the mapnTypeKeys
- the type identifier for all of the keys in the
uniform mapnTypeValues
- the type identifier for all of the values in the
uniform mappublic void beginUserType(int iPos, int nUserTypeId, int nVersionId)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the property values in the user type, and
the user type will then be terminated by a call to
PofHandler.endComplexValue()
.
beginUserType
in interface PofHandler
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisenUserTypeId
- the user type identifier,
(nUserTypeId >= 0)nVersionId
- the version identifier for the user data type data
in the POF stream, (nVersionId >= 0)public void beginUserType(int iPos, int nId, int nUserTypeId, int nVersionId)
This method call will be followed by a separate call to an "on" or
"begin" method for each of the property values in the user type, and
the user type will then be terminated by a call to
endComplexValue()
.
iPos
- context-sensitive position information: property
index within a user type, array index within an
array, element counter within a collection, entry
counter within a map, -1 otherwisenId
- identity of the object to encode, or -1 if identity
shouldn't be encoded in the POF streamnUserTypeId
- the user type identifier,
(nUserTypeId >= 0)nVersionId
- the version identifier for the user data type data
in the POF stream, (nVersionId >= 0)public void endComplexValue()
endComplexValue
in interface PofHandler
public WriteBuffer.BufferOutput getBufferOutput()
protected WritingPofHandler.Complex getComplex()
protected boolean isSkippable()
protected boolean isCompressable()
protected void encodePosition(int iPos)
iPos
- the position (property index, array index, etc.)protected boolean isTypeIdEncoded(int nTypeId)
nTypeId
- the type of the current value