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
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, 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
ConstructorsModifierConstructorDescriptionprotectedMarshallingObjectOutputStream(Marshaller marshaller, ByteOutput byteOutput) Construct a new instance that delegates to the given marshaller. -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidannotateClass(Class<?> cl) protected final voidannotateProxyClass(Class<?> cl) final voidclose()voidprotected final voiddrain()protected final booleanenableReplaceObject(boolean enable) voidflush()protected final ObjectreplaceObject(Object obj) final voidreset()final voiduseProtocolVersion(int version) voidwrite(byte[] buf) voidwrite(byte[] buf, int off, int len) voidwrite(int val) voidwriteBoolean(boolean val) voidwriteByte(int val) voidwriteBytes(String str) voidwriteChar(int val) voidwriteChars(String str) protected final voidvoidwriteDouble(double val) voidvoidwriteFloat(float val) voidwriteInt(int val) voidwriteLong(long val) protected voidvoidwriteShort(int val) protected final voidvoidwriteUnshared(Object obj) voidMethods inherited from class java.io.ObjectOutputStream
writeObjectMethods inherited from class java.io.OutputStream
nullOutputStream
-
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:
writeObjectOverridein classObjectOutputStream- Throws:
IOException
-
write
- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classObjectOutputStream- Throws:
IOException
-
write
- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classObjectOutputStream- Throws:
IOException
-
write
- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classObjectOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceObjectOutput- Overrides:
flushin classObjectOutputStream- Throws:
IOException
-
writeBoolean
- Specified by:
writeBooleanin interfaceDataOutput- Overrides:
writeBooleanin classObjectOutputStream- Throws:
IOException
-
writeByte
- Specified by:
writeBytein interfaceDataOutput- Overrides:
writeBytein classObjectOutputStream- Throws:
IOException
-
writeShort
- Specified by:
writeShortin interfaceDataOutput- Overrides:
writeShortin classObjectOutputStream- Throws:
IOException
-
writeChar
- Specified by:
writeCharin interfaceDataOutput- Overrides:
writeCharin classObjectOutputStream- Throws:
IOException
-
writeInt
- Specified by:
writeIntin interfaceDataOutput- Overrides:
writeIntin classObjectOutputStream- Throws:
IOException
-
writeLong
- Specified by:
writeLongin interfaceDataOutput- Overrides:
writeLongin classObjectOutputStream- Throws:
IOException
-
writeFloat
- Specified by:
writeFloatin interfaceDataOutput- Overrides:
writeFloatin classObjectOutputStream- Throws:
IOException
-
writeDouble
- Specified by:
writeDoublein interfaceDataOutput- Overrides:
writeDoublein classObjectOutputStream- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin interfaceDataOutput- Overrides:
writeBytesin classObjectOutputStream- Throws:
IOException
-
writeChars
- Specified by:
writeCharsin interfaceDataOutput- Overrides:
writeCharsin classObjectOutputStream- Throws:
IOException
-
writeUTF
- Specified by:
writeUTFin interfaceDataOutput- Overrides:
writeUTFin classObjectOutputStream- Throws:
IOException
-
reset
- Overrides:
resetin classObjectOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectOutput- Overrides:
closein classObjectOutputStream- Throws:
IOException
-
useProtocolVersion
- Overrides:
useProtocolVersionin classObjectOutputStream- Throws:
IOException
-
annotateClass
- Overrides:
annotateClassin classObjectOutputStream- Throws:
IOException
-
annotateProxyClass
- Overrides:
annotateProxyClassin classObjectOutputStream- Throws:
IOException
-
replaceObject
- Overrides:
replaceObjectin classObjectOutputStream- Throws:
IOException
-
enableReplaceObject
- Overrides:
enableReplaceObjectin classObjectOutputStream- Throws:
SecurityException
-
writeStreamHeader
- Overrides:
writeStreamHeaderin classObjectOutputStream- Throws:
IOException
-
writeClassDescriptor
- Overrides:
writeClassDescriptorin classObjectOutputStream- Throws:
IOException
-
drain
- Overrides:
drainin classObjectOutputStream- Throws:
IOException
-
writeFields
- Overrides:
writeFieldsin classObjectOutputStream- Throws:
IOException
-
putFields
- Overrides:
putFieldsin classObjectOutputStream- Throws:
IOException
-
defaultWriteObject
- Overrides:
defaultWriteObjectin classObjectOutputStream- Throws:
IOException
-