Package org.jboss.marshalling
Class MarshallingObjectOutputStream
java.lang.Object
java.io.OutputStream
java.io.ObjectOutputStream
org.jboss.marshalling.MarshallingObjectOutputStream
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,ObjectOutput
,ObjectStreamConstants
,AutoCloseable
An object output stream which wraps a
Marshaller
, which may be used by legacy ObjectOutputStream
-based
applications that wish to use the marshalling framework.-
Nested Class Summary
Nested classes/interfaces inherited from class java.io.ObjectOutputStream
ObjectOutputStream.PutField
-
Field Summary
FieldsFields 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, SERIAL_FILTER_PERMISSION, 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
ConstructorsModifierConstructorDescriptionprotected
MarshallingObjectOutputStream
(Marshaller marshaller, ByteOutput byteOutput) Construct a new instance that delegates to the given marshaller. -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
annotateClass
(Class<?> cl) protected final void
annotateProxyClass
(Class<?> cl) final void
close()
void
protected final void
drain()
protected final boolean
enableReplaceObject
(boolean enable) void
flush()
protected final Object
replaceObject
(Object obj) final void
reset()
final void
useProtocolVersion
(int version) void
write
(byte[] buf) void
write
(byte[] buf, int off, int len) void
write
(int val) void
writeBoolean
(boolean val) void
writeByte
(int val) void
writeBytes
(String str) void
writeChar
(int val) void
writeChars
(String str) protected final void
void
writeDouble
(double val) void
void
writeFloat
(float val) void
writeInt
(int val) void
writeLong
(long val) protected void
void
writeShort
(int val) protected final void
void
writeUnshared
(Object obj) void
Methods inherited from class java.io.ObjectOutputStream
writeObject
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
marshaller
-
-
Constructor Details
-
MarshallingObjectOutputStream
protected MarshallingObjectOutputStream(Marshaller marshaller, ByteOutput byteOutput) throws IOException, SecurityException Construct a new instance that delegates to the given marshaller.- Parameters:
marshaller
- the delegate marshaller- Throws:
IOException
- if an I/O error occursSecurityException
- if the caller does not have permission to construct an instance of this class
-
-
Method Details
-
writeObjectOverride
- Overrides:
writeObjectOverride
in classObjectOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Overrides:
write
in classObjectOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Overrides:
write
in classObjectOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in interfaceObjectOutput
- Overrides:
write
in classObjectOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceObjectOutput
- Overrides:
flush
in classObjectOutputStream
- Throws:
IOException
-
writeBoolean
- Specified by:
writeBoolean
in interfaceDataOutput
- Overrides:
writeBoolean
in classObjectOutputStream
- Throws:
IOException
-
writeByte
- Specified by:
writeByte
in interfaceDataOutput
- Overrides:
writeByte
in classObjectOutputStream
- Throws:
IOException
-
writeShort
- Specified by:
writeShort
in interfaceDataOutput
- Overrides:
writeShort
in classObjectOutputStream
- Throws:
IOException
-
writeChar
- Specified by:
writeChar
in interfaceDataOutput
- Overrides:
writeChar
in classObjectOutputStream
- Throws:
IOException
-
writeInt
- Specified by:
writeInt
in interfaceDataOutput
- Overrides:
writeInt
in classObjectOutputStream
- Throws:
IOException
-
writeLong
- Specified by:
writeLong
in interfaceDataOutput
- Overrides:
writeLong
in classObjectOutputStream
- Throws:
IOException
-
writeFloat
- Specified by:
writeFloat
in interfaceDataOutput
- Overrides:
writeFloat
in classObjectOutputStream
- Throws:
IOException
-
writeDouble
- Specified by:
writeDouble
in interfaceDataOutput
- Overrides:
writeDouble
in classObjectOutputStream
- Throws:
IOException
-
writeBytes
- Specified by:
writeBytes
in interfaceDataOutput
- Overrides:
writeBytes
in classObjectOutputStream
- Throws:
IOException
-
writeChars
- Specified by:
writeChars
in interfaceDataOutput
- Overrides:
writeChars
in classObjectOutputStream
- Throws:
IOException
-
writeUTF
- Specified by:
writeUTF
in interfaceDataOutput
- Overrides:
writeUTF
in classObjectOutputStream
- Throws:
IOException
-
reset
- Overrides:
reset
in classObjectOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceObjectOutput
- Overrides:
close
in classObjectOutputStream
- Throws:
IOException
-
useProtocolVersion
- Overrides:
useProtocolVersion
in classObjectOutputStream
- Throws:
IOException
-
annotateClass
- Overrides:
annotateClass
in classObjectOutputStream
- Throws:
IOException
-
annotateProxyClass
- Overrides:
annotateProxyClass
in classObjectOutputStream
- Throws:
IOException
-
replaceObject
- Overrides:
replaceObject
in classObjectOutputStream
- Throws:
IOException
-
enableReplaceObject
- Overrides:
enableReplaceObject
in classObjectOutputStream
- Throws:
SecurityException
-
writeStreamHeader
- Overrides:
writeStreamHeader
in classObjectOutputStream
- Throws:
IOException
-
writeClassDescriptor
- Overrides:
writeClassDescriptor
in classObjectOutputStream
- Throws:
IOException
-
drain
- Overrides:
drain
in classObjectOutputStream
- Throws:
IOException
-
writeFields
- Overrides:
writeFields
in classObjectOutputStream
- Throws:
IOException
-
putFields
- Overrides:
putFields
in classObjectOutputStream
- Throws:
IOException
-
defaultWriteObject
- Overrides:
defaultWriteObject
in classObjectOutputStream
- Throws:
IOException
-