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.

WritingPofHandler

Construct a Writing POF Handler that will write a POF stream to the passed BufferOutput object.

Parameters:

out - the BufferOutput to write to

Method Detail

registerIdentity

public void registerIdentity(int nId)

This method is invoked when an identity is encountered in the POF stream. The identity is used to uniquely identify the next value in the POF stream, and can be later referenced by the PofHandler.onIdentityReference(int, int) method.

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)

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 otherwise

cDays - the number of days in the day-time interval

cHours - the number of hours in the day-time interval, from 0 to 23 inclusive

cMinutes - the number of minutes in the day-time interval, from 0 to 59 inclusive

cSeconds - the number of seconds in the day-time interval, from 0 to 59 inclusive

cNanos - the number of nanoseconds in the day-time interval, from 0 to 999999999 inclusive

beginCollection

public void beginCollection(int iPos,
int cElements)

Report that a collection of values has been encountered in the POF stream.

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

Report that a uniform collection of values has been encountered in the POF stream.

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

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 otherwise

cElements - the exact number of values (elements) in the collection

nType - the type identifier for all of the values in the uniform collection

beginArray

public void beginArray(int iPos,
int cElements)

Report that an array of values has been encountered in the POF stream.

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

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 otherwise

cElements - the exact number of values (elements) in the array

beginUniformArray

public void beginUniformArray(int iPos,
int cElements,
int nType)

Report that a uniform array of values has been encountered in the POF stream.

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

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 otherwise

cElements - the exact number of values (elements) in the array

nType - the type identifier for all of the values in the uniform array

beginSparseArray

public void beginSparseArray(int iPos,
int cElements)

Report that a sparse array of values has been encountered in the POF stream.

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

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 otherwise

cElements - 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 number

beginUniformSparseArray

Report that a uniform sparse array of values has been encountered in the POF stream.

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

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 otherwise

cElements - 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 number

nType - the type identifier for all of the values in the uniform sparse array

beginMap

public void beginMap(int iPos,
int cElements)

Report that a map of key/value pairs has been encountered in the POF stream.

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

Report that a map of key/value pairs (with the keys being of a uniform type) has been encountered in the POF stream.

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

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.

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

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 otherwise

cElements - the exact number of key/value pairs (entries) in the map

nTypeKeys - the type identifier for all of the keys in the uniform map

nTypeValues - the type identifier for all of the values in the uniform map

beginUserType

public void beginUserType(int iPos,
int nUserTypeId,
int nVersionId)

Report that a value of a "user type" has been encountered in the POF stream. A user type is analogous to a "class", and a value of a user type is analogous to an "object".

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

Report that a value of a "user type" has been encountered in the POF stream. A user type is analogous to a "class", and a value of a user type is analogous to an "object".

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

Parameters:

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 otherwise

nId - identity of the object to encode, or -1 if identity shouldn't be encoded in the POF stream

nUserTypeId - the user type identifier, (nUserTypeId >= 0)

nVersionId - the version identifier for the user data type data in the POF stream, (nVersionId >= 0)

endComplexValue

public void endComplexValue()

Signifies the termination of the current complex value. Complex values are any of the collection, array, map and user types. For each call to one of the "begin" methods, there will be a corresponding call to this method, even if there were no contents in the complex value.