Package org.jboss.marshalling.river
Class RiverMarshaller
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,ObjectOutput
,AutoCloseable
,ByteOutput
,Marshaller
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IdentityIntMap<Class<?>>
private static final IdentityIntMap<Class<?>>
private BlockMarshaller
private final IdentityIntMap<Class<?>>
private int
private final PrivilegedExceptionAction<RiverObjectOutputStream>
private static final Field
private static final Field
private static final Field
private final IdentityHashMap<Class<?>,
Externalizer> private final IdentityIntMap<Object>
private int
private ObjectOutput
private RiverObjectOutputStream
private final SerializableClassRegistry
Fields inherited from class org.jboss.marshalling.AbstractMarshaller
classExternalizerFactory, classResolver, classTable, configuredVersion, exceptionListener, objectPreResolver, objectResolver, objectTable, serializabilityChecker, streamHeader
Fields inherited from class org.jboss.marshalling.SimpleDataOutput
buffer, bufferSize
Fields inherited from class org.jboss.marshalling.ByteOutputStream
byteOutput
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RiverMarshaller
(RiverMarshallerFactory marshallerFactory, SerializableClassRegistry registry, MarshallingConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Discard the class cache.void
Discard the instance cache.private RiverObjectOutputStream
protected void
protected void
doWriteFields
(SerializableClass info, Object obj) protected void
doWriteObject
(Object original, boolean unshared) Implementation of the actual object-writing method.protected void
doWriteSerializableObject
(SerializableClass info, Object obj, Class<?> objClass) getAccessibleEnumFieldValue
(Field field, Object obj) private static IdentityIntMap<Class<?>>
getBasicClasses
(int configuredVersion) protected BlockMarshaller
getEnumMapKeyType
(Object obj) private static Enum[]
getEnumSetElements
(Object obj) protected ObjectOutput
private RiverObjectOutputStream
void
start
(ByteOutput byteOutput) Begin writing to a stream.private void
writeBooleanArray
(boolean[] booleans) protected void
writeClass
(Class<?> objClass) protected void
writeClassClass
(Class<?> classObj) private void
writeClassTableData
(Class<?> objClass, ClassTable.Writer classTableWriter) private void
protected void
writeEnumClass
(Class<? extends Enum> objClass) protected void
writeExternalizableClass
(Class<?> objClass) protected void
writeExternalizerClass
(Class<?> objClass, Externalizer externalizer) protected boolean
writeKnownClass
(Class<?> objClass) protected void
writeNewClass
(Class<?> objClass) protected void
writeNewEnumClass
(Class<? extends Enum> objClass) protected void
writeNewExternalizableClass
(Class<?> objClass) protected void
writeNewExternalizerClass
(Class<?> objClass, Externalizer externalizer) protected void
writeNewProxyClass
(Class<?> objClass) protected void
writeNewSerializableClass
(Class<?> objClass) protected void
writeObjectArrayClass
(Class<?> objClass) protected void
writeProxyClass
(Class<?> objClass) protected void
writeSerializableClass
(Class<?> objClass) private void
writeString
(String string) void
Methods inherited from class org.jboss.marshalling.AbstractMarshaller
close, finish, writeObject, writeObjectUnshared
Methods inherited from class org.jboss.marshalling.SimpleDataOutput
flush, shallowFlush, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort
Methods inherited from class java.io.OutputStream
nullOutputStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.marshalling.ByteOutput
write, write, write
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort
Methods inherited from interface java.io.ObjectOutput
flush, write, write, write
-
Field Details
-
instanceCache
-
classCache
-
externalizers
-
instanceSeq
private int instanceSeq -
classSeq
private int classSeq -
registry
-
objectOutputStream
-
objectOutput
-
blockMarshaller
-
createObjectOutputStreamAction
-
BASIC_CLASSES_V2
-
BASIC_CLASSES_V3
-
ENUM_SET_ELEMENT_TYPE_FIELD
-
ENUM_SET_VALUES_FIELD
-
ENUM_MAP_KEY_TYPE_FIELD
-
-
Constructor Details
-
RiverMarshaller
protected RiverMarshaller(RiverMarshallerFactory marshallerFactory, SerializableClassRegistry registry, MarshallingConfiguration configuration) throws IOException - Throws:
IOException
-
-
Method Details
-
doWriteObject
Description copied from class:AbstractObjectOutput
Implementation of the actual object-writing method.- Specified by:
doWriteObject
in classAbstractObjectOutput
- Parameters:
original
- the object to writeunshared
-true
if the instance is unshared,false
if it is shared- Throws:
IOException
- if an I/O error occurs
-
getBasicClasses
-
getEnumMapKeyType
-
getEnumSetElementType
-
getEnumSetElements
-
getAccessibleEnumFieldValue
-
writeBooleanArray
- Throws:
IOException
-
writeEndBlock
- Throws:
IOException
-
getObjectOutput
-
getBlockMarshaller
-
getObjectOutputStream
- Throws:
IOException
-
createObjectOutputStream
- Throws:
IOException
-
doWriteSerializableObject
protected void doWriteSerializableObject(SerializableClass info, Object obj, Class<?> objClass) throws IOException - Throws:
IOException
-
doWriteFields
- Throws:
IOException
-
doWriteEmptyFields
- Throws:
IOException
-
writeProxyClass
- Throws:
IOException
-
writeNewProxyClass
- Throws:
IOException
-
writeEnumClass
- Throws:
IOException
-
writeNewEnumClass
- Throws:
IOException
-
writeClassClass
- Throws:
IOException
-
writeObjectArrayClass
- Throws:
IOException
-
writeClass
- Throws:
IOException
-
writeNewClass
- Throws:
IOException
-
writeClassTableData
private void writeClassTableData(Class<?> objClass, ClassTable.Writer classTableWriter) throws IOException - Throws:
IOException
-
writeKnownClass
- Throws:
IOException
-
writeSerializableClass
- Throws:
IOException
-
writeNewSerializableClass
- Throws:
IOException
-
writeExternalizableClass
- Throws:
IOException
-
writeNewExternalizableClass
- Throws:
IOException
-
writeExternalizerClass
protected void writeExternalizerClass(Class<?> objClass, Externalizer externalizer) throws IOException - Throws:
IOException
-
writeNewExternalizerClass
protected void writeNewExternalizerClass(Class<?> objClass, Externalizer externalizer) throws IOException - Throws:
IOException
-
clearInstanceCache
Description copied from interface:Marshaller
Discard the instance cache. May also discard the class cache in implementations that do not support separated class and instance caches.- Throws:
IOException
- if an error occurs
-
clearClassCache
Description copied from interface:Marshaller
Discard the class cache. Implicitly also discards the instance cache.- Throws:
IOException
- if an error occurs
-
start
Description copied from class:AbstractMarshaller
Begin writing to a stream.- Specified by:
start
in interfaceMarshaller
- Overrides:
start
in classAbstractMarshaller
- Parameters:
byteOutput
- the new stream- Throws:
IOException
- if an error occurs
-
writeString
- Throws:
IOException
-
writeUTF
Description copied from class:SimpleDataOutput
- Specified by:
writeUTF
in interfaceDataOutput
- Overrides:
writeUTF
in classSimpleDataOutput
- Throws:
IOException
-