| Modifier and Type | Class and Description |
|---|---|
| private class | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private FastStack | |
| private FastStack | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | CustomObjectOutputStream(CustomObjectOutputStream.
Warning, this object is expensive to create (due to functionality inherited from superclass). |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| public void | defaultWriteObject()
Methods to delegate to callback
|
| public void | flush()
Overrides java. Implements java. |
| public static synchronized CustomObjectOutputStream | |
| public CustomObjectOutputStream. | |
| public CustomObjectOutputStream. | |
| public void | pushCallback(CustomObjectOutputStream.
Allows the CustomObjectOutputStream (which is expensive to create) to be reused. |
| public ObjectOutputStream. | putFields()
Overrides java. |
| public void | |
| public void | useProtocolVersion(int
use ProtocolVersion from java.io.ObjectStreamConstants. version)
Specify stream protocol version to use when writing the stream.
|
| public void | write(byte[]
the data to be written buf)Overrides java. Implements java. |
| public void | write(int
the byte to be written to the stream val)Overrides java. Implements java. |
| public void | write(byte[]
the data to be written buf, int the start offset in the data off, int the number of bytes that are written len)Overrides java. Implements java. |
| public void | writeBoolean(boolean
the boolean to be written val)Overrides java. Implements java. |
| public void | writeByte(int
the byte value to be written val)Overrides java. Implements java. |
| public void | writeBytes(String
the String of bytes to be written str)Overrides java. Implements java. |
| public void | writeChar(int
the char value to be written val)Overrides java. Implements java. |
| public void | writeChars(String
the String of chars to be written str)Overrides java. Implements java. |
| public void | writeDouble(double
the double value to be written val)Overrides java. Implements java. |
| public void | writeFields()
Overrides java. |
| public void | writeFloat(float
the float value to be written val)Overrides java. Implements java. |
| public void | writeInt(int
the integer value to be written val)Overrides java. Implements java. |
| public void | writeLong(long
the long value to be written val)Overrides java. Implements java. |
| protected void | writeObjectOverride(Object
object to be written to the underlying stream obj)
Method used by subclasses to override the default writeObject method.
|
| public void | writeShort(int
the short value to be written val)Overrides java. Implements java. |
| public void | writeUnshared(Object
object to write to stream obj)Overrides java. |
| public void | writeUTF(String
the String to be written str)Overrides java. Implements java. |
| callbacks | back to summary |
|---|---|
| private FastStack callbacks | |
| customFields | back to summary |
|---|---|
| private FastStack customFields | |
| DATA_HOLDER_KEY | back to summary |
|---|---|
| private static final String DATA_HOLDER_KEY | |
| CustomObjectOutputStream | back to summary |
|---|---|
| public CustomObjectOutputStream(CustomObjectOutputStream. Warning, this object is expensive to create (due to functionality inherited from superclass). Use the static fetch() method instead, wherever possible. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes the stream. This method must be called to release any resources associated with the stream.
| |
| defaultWriteObject | back to summary |
|---|---|
| public void defaultWriteObject() throws IOException Overrides java. Methods to delegate to callback
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Doc from java. Flushes the stream. This will write any buffered output bytes and flush through to the underlying stream.
| |
| getInstance | back to summary |
|---|---|
| public static synchronized CustomObjectOutputStream getInstance(DataHolder whereFrom, CustomObjectOutputStream. | |
| peekCallback | back to summary |
|---|---|
| public CustomObjectOutputStream. | |
| popCallback | back to summary |
|---|---|
| public CustomObjectOutputStream. | |
| pushCallback | back to summary |
|---|---|
| public void pushCallback(CustomObjectOutputStream. Allows the CustomObjectOutputStream (which is expensive to create) to be reused. | |
| putFields | back to summary |
|---|---|
| public ObjectOutputStream. Overrides java. Doc from java. Retrieve the object used to buffer persistent fields to be written to the stream. The fields will be written to the stream when writeFields method is called.
| |
| reset | back to summary |
|---|---|
| public void reset() Overrides java. Unsupported methods | |
| useProtocolVersion | back to summary |
|---|---|
| public void useProtocolVersion(int version) Overrides java. Doc from java. Specify stream protocol version to use when writing the stream. This routine provides a hook to enable the current version of Serialization to write in a format that is backwards compatible to a previous version of the stream format. Every effort will be made to avoid introducing additional backwards incompatibilities; however, sometimes there is no other alternative.
| |
| write | back to summary |
|---|---|
| public void write(byte[] buf) throws IOException Overrides java. Implements java. Doc from java. Writes an array of bytes. This method will block until the bytes are actually written.
| |
| write | back to summary |
|---|---|
| public void write(int val) throws IOException Overrides java. Implements java. Doc from java. Writes a byte. This method will block until the byte is actually written.
| |
| write | back to summary |
|---|---|
| public void write(byte[] buf, int off, int len) throws IOException Overrides java. Implements java. Doc from java. Writes a sub array of bytes.
| |
| writeBoolean | back to summary |
|---|---|
| public void writeBoolean(boolean val) throws IOException Overrides java. Implements java. Doc from java. Writes a boolean.
| |
| writeByte | back to summary |
|---|---|
| public void writeByte(int val) throws IOException Overrides java. Implements java. Doc from java. Writes an 8-bit byte.
| |
| writeBytes | back to summary |
|---|---|
| public void writeBytes(String str) Overrides java. Implements java. Doc from java. Writes a String as a sequence of bytes.
| |
| writeChar | back to summary |
|---|---|
| public void writeChar(int val) throws IOException Overrides java. Implements java. Doc from java. Writes a 16-bit char.
| |
| writeChars | back to summary |
|---|---|
| public void writeChars(String str) throws IOException Overrides java. Implements java. Doc from java. Writes a String as a sequence of chars.
| |
| writeDouble | back to summary |
|---|---|
| public void writeDouble(double val) throws IOException Overrides java. Implements java. Doc from java. Writes a 64-bit double.
| |
| writeFields | back to summary |
|---|---|
| public void writeFields() throws IOException Overrides java. Doc from java. Write the buffered fields to the stream.
| |
| writeFloat | back to summary |
|---|---|
| public void writeFloat(float val) throws IOException Overrides java. Implements java. Doc from java. Writes a 32-bit float.
| |
| writeInt | back to summary |
|---|---|
| public void writeInt(int val) throws IOException Overrides java. Implements java. Doc from java. Writes a 32-bit int.
| |
| writeLong | back to summary |
|---|---|
| public void writeLong(long val) throws IOException Overrides java. Implements java. Doc from java. Writes a 64-bit long.
| |
| writeObjectOverride | back to summary |
|---|---|
| protected void writeObjectOverride(Object obj) throws IOException Overrides java. Doc from java. Method used by subclasses to override the default writeObject method. This method is called by trusted subclasses of ObjectOutputStream that constructed ObjectOutputStream using the protected no-arg constructor. The subclass is expected to provide an override method with the modifier "final".
| |
| writeShort | back to summary |
|---|---|
| public void writeShort(int val) throws IOException Overrides java. Implements java. Doc from java. Writes a 16-bit short.
| |
| writeUnshared | back to summary |
|---|---|
| public void writeUnshared(Object obj) Overrides java. Doc from java. Writes an "unshared" object to the ObjectOutputStream. This method is identical to writeObject, except that it always writes the given object as a new, unique object in the stream (as opposed to a back-reference pointing to a previously serialized instance). Specifically:
ObjectOutputStream subclasses which override this method can only be constructed in security contexts possessing the "enableSubclassImplementation" SerializablePermission; any attempt to instantiate such a subclass without this permission will cause a SecurityException to be thrown.
| |
| writeUTF | back to summary |
|---|---|
| public void writeUTF(String str) throws IOException Overrides java. Implements java. Doc from java. Primitive data write of this String in modified UTF-8 format. Note that there is a significant difference between writing a String into the stream as primitive data or as an Object. A String instance written by writeObject is written into the stream as a String initially. Future writeObject() calls write references to the string into the stream.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Map | |
| public void | put(String
the name of the serializable field name, Object the value to assign to the field
(which may be val)null)Implements abstract java. |
| public void | put(String
the name of the serializable field name, byte the value to assign to the field val)Implements abstract java. |
| public void | put(String
the name of the serializable field name, char the value to assign to the field val)Implements abstract java. |
| public void | put(String
the name of the serializable field name, double the value to assign to the field val)Implements abstract java. |
| public void | put(String
the name of the serializable field name, float the value to assign to the field val)Implements abstract java. |
| public void | put(String
the name of the serializable field name, int the value to assign to the field val)Implements abstract java. |
| public void | put(String
the name of the serializable field name, long the value to assign to the field val)Implements abstract java. |
| public void | put(String
the name of the serializable field name, short the value to assign to the field val)Implements abstract java. |
| public void | put(String
the name of the serializable field name, boolean the value to assign to the field val)Implements abstract java. |
| public void | write(ObjectOutput
the stream to write the data and fields to out)Implements abstract java. PutField object.
|
| fields | back to summary |
|---|---|
| private final Map<K, V> fields | |
| CustomPutField | back to summary |
|---|---|
| private CustomPutField() | |
| asMap | back to summary |
|---|---|
| public Map | |
| put | back to summary |
|---|---|
| public void put(String name, Object val) Implements abstract java. Doc from java. Put the value of the named Object field into the persistent field. | |
| put | back to summary |
|---|---|
| public void put(String name, byte val) Implements abstract java. Doc from java. Put the value of the named byte field into the persistent field.
| |
| put | back to summary |
|---|---|
| public void put(String name, char val) Implements abstract java. Doc from java. Put the value of the named char field into the persistent field.
| |
| put | back to summary |
|---|---|
| public void put(String name, double val) Implements abstract java. Doc from java. Put the value of the named double field into the persistent field.
| |
| put | back to summary |
|---|---|
| public void put(String name, float val) Implements abstract java. Doc from java. Put the value of the named float field into the persistent field.
| |
| put | back to summary |
|---|---|
| public void put(String name, int val) Implements abstract java. Doc from java. Put the value of the named int field into the persistent field.
| |
| put | back to summary |
|---|---|
| public void put(String name, long val) Implements abstract java. Doc from java. Put the value of the named long field into the persistent field.
| |
| put | back to summary |
|---|---|
| public void put(String name, short val) Implements abstract java. Doc from java. Put the value of the named short field into the persistent field.
| |
| put | back to summary |
|---|---|
| public void put(String name, boolean val) Implements abstract java. Doc from java. Put the value of the named boolean field into the persistent field.
| |
| write | back to summary |
|---|---|
| public void write(ObjectOutput out) throws IOException Implements abstract java. Doc from java. Write the data and fields to the specified ObjectOutput stream,
which must be the same stream that produced this
| |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| close | back to summary |
|---|---|
| public void close() throws IOException | |
| defaultWriteObject | back to summary |
|---|---|
| public void defaultWriteObject() throws IOException | |
| flush | back to summary |
|---|---|
| public void flush() throws IOException | |
| writeFieldsToStream | back to summary |
|---|---|
| public void writeFieldsToStream(Map<K, V> fields) throws IOException | |
| writeToStream | back to summary |
|---|---|
| public void writeToStream(Object object) throws IOException | |