java.lang.Object
java.io.OutputStream
java.io.ObjectOutputStream
org.jboss.marshalling.MarshallerObjectOutputStream
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,ObjectOutput,ObjectStreamConstants,AutoCloseable,ByteOutput
A marshaller's object output stream. Used by marshallers for compatibility with Java serialization. Instances of
this class may be passed in to the overridden serialization methods for a class implementing
Serializable.
This class is not part of the marshalling API; rather it is intended for marshaller implementers to make it easier to develop Java serialization-compatible marshallers.
-
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
ConstructorsModifierConstructorDescriptionprotectedConstruct 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()abstract voidprotected final voiddrain()protected final booleanenableReplaceObject(boolean enable) voidflush()abstract ObjectOutputStream.PutFieldprotected final ObjectreplaceObject(Object obj) final voidreset()final voiduseProtocolVersion(int version) voidwrite(byte[] buf) Write all the bytes from the given array to the stream.voidwrite(byte[] buf, int off, int len) Write some of the bytes from the given array to the stream.voidwrite(int val) Writes to the output stream the eight low-order bits of the argumentb.voidwriteBoolean(boolean val) voidwriteByte(int val) voidwriteBytes(String str) protected final voidvoidwriteDouble(double val) abstract voidvoidwriteFloat(float val) voidwriteChar(int val) voidwriteChars(String str) 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
-
MarshallerObjectOutputStream
Construct a new instance that delegates to the given marshaller.- Parameters:
output- 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
Writes to the output stream the eight low-order bits of the argumentb. The 24 high-order bits ofbare ignored.- Specified by:
writein interfaceByteOutput- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classObjectOutputStream- Parameters:
val- the byte to write- Throws:
IOException- if an error occurs
-
write
Write all the bytes from the given array to the stream.- Specified by:
writein interfaceByteOutput- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classObjectOutputStream- Parameters:
buf- the byte array- Throws:
IOException- if an error occurs
-
write
Write some of the bytes from the given array to the stream.- Specified by:
writein interfaceByteOutput- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Overrides:
writein classObjectOutputStream- Parameters:
buf- the byte arrayoff- the index to start writing fromlen- the number of bytes to write- Throws:
IOException- if an error occurs
-
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
-