Class CompactObjectOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ObjectOutputStream
-
- org.teiid.netty.handler.codec.serialization.CompactObjectOutputStream
-
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,ObjectOutput
,ObjectStreamConstants
,AutoCloseable
public class CompactObjectOutputStream extends ObjectOutputStream
- Version:
- $Rev: 6 $, $Date: 2008-08-07 20:40:10 -0500 (Thu, 07 Aug 2008) $
- Author:
- The Netty Project (netty-dev@lists.jboss.org), Trustin Lee (tlee@redhat.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.io.ObjectOutputStream
ObjectOutputStream.PutField
-
-
Field Summary
Fields Modifier and Type Field Description static Map<Class<?>,Integer>
KNOWN_CLASSES
static Map<Integer,Class<?>>
KNOWN_CODES
-
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
-
-
Constructor Summary
Constructors Constructor Description CompactObjectOutputStream(OutputStream out)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addKnownClass(Class<?> clazz, byte code)
List<InputStreamFactory.StreamFactoryReference>
getReferences()
List<InputStream>
getStreams()
protected Object
replaceObject(Object obj)
void
reset()
protected void
writeClassDescriptor(ObjectStreamClass desc)
protected void
writeStreamHeader()
-
Methods inherited from class java.io.ObjectOutputStream
annotateClass, annotateProxyClass, close, defaultWriteObject, drain, enableReplaceObject, flush, putFields, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeUnshared, writeUTF
-
-
-
-
Constructor Detail
-
CompactObjectOutputStream
public CompactObjectOutputStream(OutputStream out) throws IOException
- Throws:
IOException
-
-
Method Detail
-
addKnownClass
public static void addKnownClass(Class<?> clazz, byte code)
-
getStreams
public List<InputStream> getStreams()
-
reset
public void reset() throws IOException
- Overrides:
reset
in classObjectOutputStream
- Throws:
IOException
-
getReferences
public List<InputStreamFactory.StreamFactoryReference> getReferences()
-
writeStreamHeader
protected void writeStreamHeader() throws IOException
- Overrides:
writeStreamHeader
in classObjectOutputStream
- Throws:
IOException
-
writeClassDescriptor
protected void writeClassDescriptor(ObjectStreamClass desc) throws IOException
- Overrides:
writeClassDescriptor
in classObjectOutputStream
- Throws:
IOException
-
replaceObject
protected Object replaceObject(Object obj) throws IOException
- Overrides:
replaceObject
in classObjectOutputStream
- Throws:
IOException
-
-