|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.io.pof.PofHelper
com.tangosol.io.pof.PofBufferWriter
public class PofBufferWriter
PofWriter implementation that writes POF-encoded data to a BufferOutput.
| Nested Class Summary | |
|---|---|
static class |
PofBufferWriter.ReferenceLibraryA "library" of object references and their corresponding identities in the POF stream. |
static class |
PofBufferWriter.UserTypeWriterThe UserTypeWriter implementation is a contextually-aware PofWriter whose purpose is to write the properties of a value of a specified user type. |
| Nested classes/interfaces inherited from class com.tangosol.io.pof.PofHelper |
|---|
PofHelper.ReadableEntrySetMap, PofHelper.WriteableEntrySetMap |
| Field Summary | |
|---|---|
protected PofContext |
m_ctxThe PofContext used by this PofBufferWriter to serialize user types. |
protected boolean |
m_fEvolvableIndicate if the object to be written is either Evolvable or part of an Evolvable object. |
protected WritingPofHandler |
m_handlerThe WritingPofHandler used to write a POF stream. |
protected WriteBuffer.BufferOutput |
m_outThe BufferOutput object that the PofBufferWriter writes to. |
protected PofBufferWriter.ReferenceLibrary |
m_refsIf references are used, then this is the ReferenceLibrary. |
| Fields inherited from class com.tangosol.io.pof.PofHelper |
|---|
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 |
| Constructor Summary | |
|---|---|
PofBufferWriter(WriteBuffer.BufferOutput out, PofContext ctx)Construct a new PofBufferWriter that will write a POF stream to the passed BufferOutput object. |
|
PofBufferWriter(WritingPofHandler handler, PofContext ctx)Construct a new PofBufferWriter that will write a POF stream using the passed WritingPofHandler. |
|
| Method Summary | |
|---|---|
protected static void |
assertEqual(java.lang.Class clz, java.lang.Class clzTest)Assert that a class is equal to another class. |
protected void |
beginProperty(int iProp)Report that a POF property is about to be written to the POF stream. |
PofWriter |
createNestedPofWriter(int iProp)Obtain a PofWriter that can be used to write a set of properties into a single property of the current user type. |
void |
enableReference()Ensure that reference support (necessary for cyclic dependencies) is enabled. |
protected void |
endProperty(int iProp)Signifies the termination of the current POF property. |
protected WriteBuffer.BufferOutput |
getBufferOutput()Return the BufferOutput that this PofBufferWriter writes to. |
protected static int |
getNanos(java.util.Date dt)Extract the nanoseconds from the date. |
protected PofBufferWriter |
getParentWriter()If this writer is contextually within a user type, obtain the writer which created this writer in order to write the user type. |
PofContext |
getPofContext()Return the PofContext object used by this PofWriter to serialize user types to a POF stream. |
protected WritingPofHandler |
getPofHandler()Return the WritingPofHandler used internally by this PofBufferWriter to write the POF stream. |
int |
getUserTypeId()Determine the user type that is currently being written. |
int |
getVersionId()Determine the version identifier of the user type that is currently being written. |
protected boolean |
isEvolvable()Determine if the object to be written is either Evolvable or part of an Evolvable object. |
boolean |
isReferenceEnabled()Determine if reference support is enabled. |
protected void |
onException(java.lang.Exception e)Called when an unexpected exception is caught while writing to the POF stream. |
protected void |
setEvolvable(boolean fEvolvable)Set the Evolvable flag to indicate if the object to be written is Evolvable or part of an Evolvable object. |
void |
setPofContext(PofContext ctx)Configure the PofContext object used by this PofWriter to serialize user types to a POF stream. |
void |
setVersionId(int nVersionId)Set the version identifier of the user type that is currently being written. |
void |
writeBigDecimal(int iProp, java.math.BigDecimal dec)Write a BigDecimal property to the POF stream. |
void |
writeBigInteger(int iProp, java.math.BigInteger n)Write a BigInteger property to the POF stream. |
void |
writeBinary(int iProp, Binary bin)Write a Binary property to the POF stream. |
void |
writeBoolean(int iProp, boolean f)Write a boolean property to the POF stream. |
protected void |
writeBoolean(int iProp, boolean f, boolean fReferenceable)Write a boolean property to the POF stream. |
void |
writeBooleanArray(int iProp, boolean[] af)Write a boolean[] property to the POF stream. |
void |
writeByte(int iProp, byte b)Write a byte property to the POF stream. |
protected void |
writeByte(int iProp, byte b, boolean fReferenceable)Write a byte property to the POF stream. |
void |
writeByteArray(int iProp, byte[] ab)Write a byte[] property to the POF stream. |
void |
writeChar(int iProp, char ch)Write a char property to the POF stream. |
protected void |
writeChar(int iProp, char ch, boolean fReferenceable)Write a char property to the POF stream. |
void |
writeCharArray(int iProp, char[] ach)Write a char[] property to the POF stream. |
void |
writeCollection(int iProp, java.util.Collection coll)Write a Collection property to the POF stream. |
void |
writeCollection(int iProp, java.util.Collection coll, java.lang.Class clz)Write a uniform Collection property to the POF stream. |
void |
writeDate(int iProp, java.util.Date dt)Write a Date property to the POF stream in ISO8601 format. |
void |
writeDateTime(int iProp, java.util.Date dt)Write a Date property to the POF stream in ISO8601 format. |
void |
writeDateTime(int iProp, java.sql.Timestamp dt)Write a Timestamp property to the POF stream in ISO8601 format. |
void |
writeDateTimeWithZone(int iProp, java.util.Date dt)Write a Date property to the POF stream in ISO8601 format. |
void |
writeDateTimeWithZone(int iProp, java.sql.Timestamp dt)Write a Timestamp property to the POF stream in ISO8601 format. |
void |
writeDouble(int iProp, double dfl)Write a double property to the POF stream. |
protected void |
writeDouble(int iProp, double dfl, boolean fReferenceable)Write a double property to the POF stream. |
void |
writeDoubleArray(int iProp, double[] adfl)Write a double[] property to the POF stream. |
void |
writeFloat(int iProp, float fl)Write a float property to the POF stream. |
protected void |
writeFloat(int iProp, float fl, boolean fReferenceable)Write a float property to the POF stream. |
void |
writeFloatArray(int iProp, float[] afl)Write a float[] property to the POF stream. |
void |
writeInt(int iProp, int n)Write a int property to the POF stream. |
protected void |
writeInt(int iProp, int n, boolean fReferenceable)Write a int property to the POF stream. |
void |
writeIntArray(int iProp, int[] an)Write a int[] property to the POF stream. |
void |
writeLong(int iProp, long n)Write a long property to the POF stream. |
protected void |
writeLong(int iProp, long n, boolean fReferenceable)Write a long property to the POF stream. |
void |
writeLongArray(int iProp, long[] an)Write a long[] property to the POF stream. |
void |
writeLongArray(int iProp, LongArray la)Write a LongArray property to the POF stream. |
void |
writeLongArray(int iProp, LongArray la, java.lang.Class clz)Write a uniform LongArray property to the POF stream. |
void |
writeMap(int iProp, java.util.Map map)Write a Map property to the POF stream. |
void |
writeMap(int iProp, java.util.Map map, java.lang.Class clzKey)Write a uniform key Map property to the POF stream. |
void |
writeMap(int iProp, java.util.Map map, java.lang.Class clzKey, java.lang.Class clzValue)Write a uniform Map property to the POF stream. |
void |
writeObject(int iProp, java.lang.Object o)Write an Object property to the POF stream. |
void |
writeObjectArray(int iProp, java.lang.Object[] ao)Write an Object[] property to the POF stream. |
void |
writeObjectArray(int iProp, java.lang.Object[] ao, java.lang.Class clz)Write a uniform Object[] property to the POF stream. |
void |
writeRawDate(int iProp, RawDate date)Write a RawDate property to the POF stream. |
void |
writeRawDateTime(int iProp, RawDateTime dt)Write a RawDateTime property to the POF stream. |
void |
writeRawDayTimeInterval(int iProp, RawDayTimeInterval interval)Write a RawDayTimeInterval property to the POF stream. |
void |
writeRawQuad(int iProp, RawQuad qfl)Write a RawQuad property to the POF stream. |
void |
writeRawTime(int iProp, RawTime time)Write a RawTime property to the POF stream. |
void |
writeRawTimeInterval(int iProp, RawTimeInterval interval)Write a RawTimeInterval property to the POF stream. |
void |
writeRawYearMonthInterval(int iProp, RawYearMonthInterval interval)Write a RawYearMonthInterval property to the POF stream. |
void |
writeRemainder(Binary binProps)Write the remaining properties to the POF stream, terminating the writing of the currrent user type. |
void |
writeShort(int iProp, short n)Write a short property to the POF stream. |
protected void |
writeShort(int iProp, short n, boolean fReferenceable)Write a short property to the POF stream. |
void |
writeShortArray(int iProp, short[] an)Write a short[] property to the POF stream. |
void |
writeString(int iProp, java.lang.String s)Write a String property to the POF stream. |
void |
writeTime(int iProp, java.util.Date dt)Write a Date property to the POF stream in ISO8601 format. |
void |
writeTime(int iProp, java.sql.Timestamp dt)Write a Timestamp property to the POF stream in ISO8601 format. |
void |
writeTimeWithZone(int iProp, java.util.Date dt)Write a Date property to the POF stream in ISO8601 format. |
void |
writeTimeWithZone(int iProp, java.sql.Timestamp dt)Write a Timestamp property to the POF stream in ISO8601 format. |
protected void |
writeUserType(int iProp, java.lang.Object o)Write a user-type to the POF stream. |
| Field Detail |
|---|
protected WriteBuffer.BufferOutput m_out
protected PofContext m_ctx
protected boolean m_fEvolvable
protected WritingPofHandler m_handler
protected PofBufferWriter.ReferenceLibrary m_refs
| Constructor Detail |
|---|
public PofBufferWriter(WriteBuffer.BufferOutput out,
PofContext ctx)
out - the BufferOutput object to write to; must not be nullctx - the PofContext used by the new PofBufferWriter to serialize user types; must not be null
public PofBufferWriter(WritingPofHandler handler,
PofContext ctx)
handler - the WritingPofHandler used for writing; must not be nullctx - the PofContext used by the new PofBufferWriter to serialize user types; must not be null| Method Detail |
|---|
public void writeBoolean(int iProp,
boolean f)
throws java.io.IOException
writeBoolean in interface PofWriteriProp - the property indexf - the boolean property value to writejava.io.IOException - if an I/O error occurs
protected void writeBoolean(int iProp,
boolean f,
boolean fReferenceable)
throws java.io.IOException
iProp - the property indexf - the boolean property value to writefReferenceable - true if the property value is a referenceable typejava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occurs
public void writeByte(int iProp,
byte b)
throws java.io.IOException
writeByte in interface PofWriteriProp - the property indexb - the byte property value to writejava.io.IOException - if an I/O error occurs
protected void writeByte(int iProp,
byte b,
boolean fReferenceable)
throws java.io.IOException
iProp - the property indexb - the byte property value to writefReferenceable - true if the property value is a referenceable typejava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occurs
public void writeChar(int iProp,
char ch)
throws java.io.IOException
writeChar in interface PofWriteriProp - the property indexch - the char property value to writejava.io.IOException - if an I/O error occurs
protected void writeChar(int iProp,
char ch,
boolean fReferenceable)
throws java.io.IOException
iProp - the property indexch - the char property value to writefReferenceable - true if the property value is a referenceable typejava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occurs
public void writeShort(int iProp,
short n)
throws java.io.IOException
writeShort in interface PofWriteriProp - the property indexn - the short property value to writejava.io.IOException - if an I/O error occurs
protected void writeShort(int iProp,
short n,
boolean fReferenceable)
throws java.io.IOException
iProp - the property indexn - the short property value to writefReferenceable - true if the property value is a referenceable typejava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occurs
public void writeInt(int iProp,
int n)
throws java.io.IOException
writeInt in interface PofWriteriProp - the property indexn - the int property value to writejava.io.IOException - if an I/O error occurs
protected void writeInt(int iProp,
int n,
boolean fReferenceable)
throws java.io.IOException
iProp - the property indexn - the int property value to writefReferenceable - true if the property value is a referenceable typejava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occurs
public void writeLong(int iProp,
long n)
throws java.io.IOException
writeLong in interface PofWriteriProp - the property indexn - the long property value to writejava.io.IOException - if an I/O error occurs
protected void writeLong(int iProp,
long n,
boolean fReferenceable)
throws java.io.IOException
iProp - the property indexn - the long property value to writefReferenceable - true if the property value is a referenceable typejava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occurs
public void writeFloat(int iProp,
float fl)
throws java.io.IOException
writeFloat in interface PofWriteriProp - the property indexfl - the float property value to writejava.io.IOException - if an I/O error occurs
protected void writeFloat(int iProp,
float fl,
boolean fReferenceable)
throws java.io.IOException
iProp - the property indexfl - the float property value to writefReferenceable - true if the property value is a referenceable typejava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occurs
public void writeDouble(int iProp,
double dfl)
throws java.io.IOException
writeDouble in interface PofWriteriProp - the property indexdfl - the double property value to writejava.io.IOException - if an I/O error occurs
protected void writeDouble(int iProp,
double dfl,
boolean fReferenceable)
throws java.io.IOException
iProp - the property indexdfl - the double property value to writefReferenceable - true if the property value is a referenceable typejava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occurs
public void writeBooleanArray(int iProp,
boolean[] af)
throws java.io.IOException
writeBooleanArray in interface PofWriteriProp - the property indexaf - the boolean[] property value to writejava.io.IOException - if an I/O error occurs
public void writeByteArray(int iProp,
byte[] ab)
throws java.io.IOException
writeByteArray in interface PofWriteriProp - the property indexab - the byte[] property value to writejava.io.IOException - if an I/O error occurs
public void writeCharArray(int iProp,
char[] ach)
throws java.io.IOException
writeCharArray in interface PofWriteriProp - the property indexach - the char[] property value to writejava.io.IOException - if an I/O error occurs
public void writeShortArray(int iProp,
short[] an)
throws java.io.IOException
writeShortArray in interface PofWriteriProp - the property indexan - the short[] property value to writejava.io.IOException - if an I/O error occurs
public void writeIntArray(int iProp,
int[] an)
throws java.io.IOException
writeIntArray in interface PofWriteriProp - the property indexan - the int[] property value to writejava.io.IOException - if an I/O error occurs
public void writeLongArray(int iProp,
long[] an)
throws java.io.IOException
writeLongArray in interface PofWriteriProp - the property indexan - the long[] property value to writejava.io.IOException - if an I/O error occurs
public void writeFloatArray(int iProp,
float[] afl)
throws java.io.IOException
writeFloatArray in interface PofWriteriProp - the property indexafl - the float[] property value to writejava.io.IOException - if an I/O error occurs
public void writeDoubleArray(int iProp,
double[] adfl)
throws java.io.IOException
writeDoubleArray in interface PofWriteriProp - the property indexadfl - the double[] property value to writejava.io.IOException - if an I/O error occurs
public void writeBigInteger(int iProp,
java.math.BigInteger n)
throws java.io.IOException
writeBigInteger in interface PofWriteriProp - the property indexn - the BigInteger property value to writejava.io.IOException - if an I/O error occurs
public void writeRawQuad(int iProp,
RawQuad qfl)
throws java.io.IOException
writeRawQuad in interface PofWriteriProp - the property indexqfl - the RawQuad property value to writejava.io.IOException - if an I/O error occurs
public void writeBigDecimal(int iProp,
java.math.BigDecimal dec)
throws java.io.IOException
writeBigDecimal in interface PofWriteriProp - the property indexdec - the BigDecimal property value to writejava.io.IOException - if an I/O error occurs
public void writeBinary(int iProp,
Binary bin)
throws java.io.IOException
Binary property to the POF stream.writeBinary in interface PofWriteriProp - the property indexbin - the Binary property value to writejava.io.IOException - if an I/O error occurs
public void writeString(int iProp,
java.lang.String s)
throws java.io.IOException
writeString in interface PofWriteriProp - the property indexs - the String property value to writejava.io.IOException - if an I/O error occurs
public void writeDate(int iProp,
java.util.Date dt)
throws java.io.IOException
This method encodes the year, month and day information of the specified Date object. No time or timezone information is encoded.
writeDate in interface PofWriteriProp - the property indexdt - the Date property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeDateTime(int iProp,
java.util.Date dt)
throws java.io.IOException
This method encodes the year, month, day, hour, minute, second and millisecond information of the specified Date object. No timezone information is encoded.
writeDateTime in interface PofWriteriProp - the property indexdt - the Date property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeDateTime(int iProp,
java.sql.Timestamp dt)
throws java.io.IOException
This method encodes the year, month, day, hour, minute, second, millisecond and nanosecond information of the specified Timestamp object. No timezone information is encoded.
writeDateTime in interface PofWriteriProp - the property indexdt - the Timestamp property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeDateTimeWithZone(int iProp,
java.util.Date dt)
throws java.io.IOException
This method encodes the year, month, day, hour, minute, second, millisecond and timezone information of the specified Date object.
writeDateTimeWithZone in interface PofWriteriProp - the property indexdt - the Date property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeDateTimeWithZone(int iProp,
java.sql.Timestamp dt)
throws java.io.IOException
This method encodes the year, month, day, hour, minute, second, millisecond, nanosecond and timezone information of the specified Timestamp object.
writeDateTimeWithZone in interface PofWriteriProp - the property indexdt - the Timestamp property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeTime(int iProp,
java.util.Date dt)
throws java.io.IOException
This method encodes the hour, minute, second and millisecond information of the specified Date object. No year, month, day or timezone information is encoded.
writeTime in interface PofWriteriProp - the property indexdt - the Date property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeTime(int iProp,
java.sql.Timestamp dt)
throws java.io.IOException
This method encodes the hour, minute, second, millisecond and nanosecond information of the specified Timestamp object.
writeTime in interface PofWriteriProp - the property indexdt - the Timestamp property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeTimeWithZone(int iProp,
java.util.Date dt)
throws java.io.IOException
This method encodes the hour, minute, second, millisecond and timezone information of the specified Date object. No year, month or day information is encoded.
writeTimeWithZone in interface PofWriteriProp - the property indexdt - the Date property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeTimeWithZone(int iProp,
java.sql.Timestamp dt)
throws java.io.IOException
This method encodes the hour, minute, second, millisecond, nanosecond and timezone information of the specified Timestamp object. No year, month or day information is encoded.
writeTimeWithZone in interface PofWriteriProp - the property indexdt - the Timestamp property value to write in ISO8601 formatjava.io.IOException - if an I/O error occurs
public void writeRawDate(int iProp,
RawDate date)
throws java.io.IOException
writeRawDate in interface PofWriteriProp - the property indexdate - the RawDate property value to writejava.io.IOException - if an I/O error occurs
public void writeRawTime(int iProp,
RawTime time)
throws java.io.IOException
writeRawTime in interface PofWriteriProp - the property indextime - the RawTime property value to writejava.io.IOException - if an I/O error occurs
public void writeRawDateTime(int iProp,
RawDateTime dt)
throws java.io.IOException
writeRawDateTime in interface PofWriteriProp - the property indexdt - the RawDateTime property value to writejava.io.IOException - if an I/O error occurs
public void writeRawYearMonthInterval(int iProp,
RawYearMonthInterval interval)
throws java.io.IOException
writeRawYearMonthInterval in interface PofWriteriProp - the property indexinterval - the RawYearMonthInterval property value to writejava.io.IOException - if an I/O error occurs
public void writeRawTimeInterval(int iProp,
RawTimeInterval interval)
throws java.io.IOException
writeRawTimeInterval in interface PofWriteriProp - the property indexinterval - the RawTimeInterval property value to writejava.io.IOException - if an I/O error occurs
public void writeRawDayTimeInterval(int iProp,
RawDayTimeInterval interval)
throws java.io.IOException
writeRawDayTimeInterval in interface PofWriteriProp - the property indexinterval - the RawDayTimeInterval property value to writejava.io.IOException - if an I/O error occurs
public void writeObject(int iProp,
java.lang.Object o)
throws java.io.IOException
The given object must be an instance of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for the object must be obtainable from the PofContext associated with this PofWriter.
writeObject in interface PofWriteriProp - the property indexo - the Object property to writejava.io.IOException - if an I/O error occurs
protected void writeUserType(int iProp,
java.lang.Object o)
throws java.io.IOException
iProp - the property indexo - the object to writejava.io.IOException - if an I/O error occurs
public void writeObjectArray(int iProp,
java.lang.Object[] ao)
throws java.io.IOException
Each element of the given array must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each element of the array must be obtainable from the PofContext associated with this PofWriter.
writeObjectArray in interface PofWriteriProp - the property indexao - the Object[] property to writejava.io.IOException - if an I/O error occurs
public void writeObjectArray(int iProp,
java.lang.Object[] ao,
java.lang.Class clz)
throws java.io.IOException
Each element of the given array must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each element of the array must be obtainable from the PofContext associated with this PofWriter.
Additionally, the type of each element must be equal to the specified class.
writeObjectArray in interface PofWriteriProp - the property indexao - the Object[] property to writeclz - the class of all elements; must not be nulljava.io.IOException - if an I/O error occurs
public void writeCollection(int iProp,
java.util.Collection coll)
throws java.io.IOException
Each element of the given Collection must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each element of the Collection must be obtainable from the PofContext associated with this PofWriter.
writeCollection in interface PofWriteriProp - the property indexcoll - the Collection property to writejava.io.IOException - if an I/O error occurs
public void writeCollection(int iProp,
java.util.Collection coll,
java.lang.Class clz)
throws java.io.IOException
Each element of the given Collection must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each element of the Collection must be obtainable from the PofContext associated with this PofWriter.
Additionally, the type of each element must be equal to the specified class.
writeCollection in interface PofWriteriProp - the property indexcoll - the Collection property to writeclz - the class of all elements; must not be nulljava.io.IOException - if an I/O error occurs
public void writeLongArray(int iProp,
LongArray la)
throws java.io.IOException
PofWriterEach element of the given LongArray must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each element of the LongArray must be obtainable from the PofContext associated with this PofWriter.
writeLongArray in interface PofWriteriProp - the property indexla - the LongArray property to writejava.io.IOException - if an I/O error occurs
public void writeLongArray(int iProp,
LongArray la,
java.lang.Class clz)
throws java.io.IOException
Each element of the given LongArray must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each element of the LongArray must be obtainable from the PofContext associated with this PofWriter.
Additionally, the type of each element must be equal to the specified class.
writeLongArray in interface PofWriteriProp - the property indexla - the LongArray property to writeclz - the class of all elements; must not be nulljava.io.IOException - if an I/O error occurs
public void writeMap(int iProp,
java.util.Map map)
throws java.io.IOException
Each key and value of the given Map must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each key and value of the Map must be obtainable from the PofContext associated with this PofWriter.
writeMap in interface PofWriteriProp - the property indexmap - the Map property to writejava.io.IOException - if an I/O error occurs
public void writeMap(int iProp,
java.util.Map map,
java.lang.Class clzKey)
throws java.io.IOException
Each key and value of the given Map must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each key and value of the Map must be obtainable from the PofContext associated with this PofWriter.
Additionally, the type of each key must be equal to the specified class.
writeMap in interface PofWriteriProp - the property indexmap - the Map property to writeclzKey - the class of all keys; must not be nulljava.io.IOException - if an I/O error occurs
public void writeMap(int iProp,
java.util.Map map,
java.lang.Class clzKey,
java.lang.Class clzValue)
throws java.io.IOException
Each key and value of the given Map must be an instance (or an array of instances) of one of the following:
RawQuadBinaryRawDateRawTimeRawDateTimeRawYearMonthIntervalRawTimeIntervalRawDayTimeIntervalLongArrayPortableObjectOtherwise, a PofSerializer for each key and value of the Map must be obtainable from the PofContext associated with this PofWriter.
Additionally, the type of each key and value must be equal to the specified key class and value class respectively.
writeMap in interface PofWriteriProp - the property indexmap - the Map property to writeclzKey - the class of all keys; must not be nullclzValue - the class of all values; must not be nulljava.io.IOException - if an I/O error occurspublic PofContext getPofContext()
getPofContext in interface PofWriterpublic void setPofContext(PofContext ctx)
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 ctxOrig = writer.getPofContext();
try
{
// switch to another PofContext
PofContext ctxNew = ...;
writer.setContext(ctxNew);
// output POF data using the writer
}
finally
{
// restore the original PofContext
writer.setPofContext(ctxOrig);
}
setPofContext in interface PofWriterctx - the new PofContext; must not be nullpublic int getUserTypeId()
getUserTypeId in interface PofWriterpublic int getVersionId()
getVersionId in interface PofWriterpublic void setVersionId(int nVersionId)
setVersionId in interface PofWriternVersionId - the user type identifier; must be non-negative
public PofWriter createNestedPofWriter(int iProp)
throws java.io.IOException
createNestedPofWriter in interface PofWriteriProp - the property indexjava.io.IOException - if an I/O error occurs
public void writeRemainder(Binary binProps)
throws java.io.IOException
Calling this method terminates the current user type by writing a -1 to the POF stream after the last indexed property. Subsequent calls to the various writeXYZ methods of this interface will fail after this method is called.
writeRemainder in interface PofWriterbinProps - a Binary object containing zero or more indexed properties in binary POF encoded form; may be nulljava.io.IOException - if an I/O error occursprotected PofBufferWriter getParentWriter()
protected void beginProperty(int iProp)
throws java.io.IOException
This method call will be followed by one or more separate calls to a "write" method and the property extent will then be terminated by a call to endProperty(int).
iProp - the index of the property being writtenjava.lang.IllegalArgumentException - if the property index is invalid, or is less than or equal to the index of the previous property written to the POF streamjava.io.IOException - if an I/O error occursprotected void endProperty(int iProp)
iProp - the index of the current property
protected void onException(java.lang.Exception e)
throws java.io.IOException
If the given exception wraps an IOException, the IOException is unwrapped and rethrown; otherwise the given exception is rethrown.
e - the exceptionjava.io.IOException - the wrapped IOException, if the given exception is a wrapped IOExceptionprotected static int getNanos(java.util.Date dt)
dt - the Date object to extract the nanoseconds from
protected static void assertEqual(java.lang.Class clz,
java.lang.Class clzTest)
clz - the expected class; must not be nullclzTest - the class to test for equality; must not be nulljava.lang.IllegalArgumentException - if the second class is not equal to the firstprotected WriteBuffer.BufferOutput getBufferOutput()
protected WritingPofHandler getPofHandler()
public void enableReference()
public boolean isReferenceEnabled()
protected boolean isEvolvable()
protected void setEvolvable(boolean fEvolvable)
fEvolvable - true iff the object to be written is Evolvable
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||