|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.remote.UniversalSerializer
public final class UniversalSerializer
The UniversalSerializer
converts an object state into a byte stream in such a way that
the byte stream can be converted back into a copy of the object.
ISerializer
Constructor Summary | |
---|---|
UniversalSerializer()
Creates a new instance of UniversalSerializer with default
serializer registrations. |
Method Summary | |
---|---|
ITypeSerializer |
getTypeSerializer(java.lang.Class<?> pTypeClass)
Gets the ITypeSerializer for a type value. |
ITypeSerializer |
getTypeSerializer(int pTypeValue)
Gets the ITypeSerializer for a type value. |
ITypeSerializer |
getTypeSerializer(java.lang.Object pObject)
Gets the ITypeSerializer for a type value. |
java.lang.Object |
read(java.io.DataInputStream pIn)
Reads in a serialized object from a stream. |
java.lang.Object |
read(java.io.DataInputStream pIn,
TypeCache pCache)
Reads in a serialized object from a stream. |
void |
registerTypeSerializer(ITypeSerializer pTypeSerializer)
Registers a type serializer. |
void |
unregisterTypeSerializer(ITypeSerializer pTypeSerializer)
Unregisters a type serializer. |
void |
write(java.io.DataOutputStream pOut,
java.lang.Object pObject)
Writes a serialized object to a stream. |
void |
write(java.io.DataOutputStream pOut,
java.lang.Object pObject,
TypeCache pCache)
Writes a serialized object to a stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UniversalSerializer()
UniversalSerializer
with default
serializer registrations.
Method Detail |
---|
public final java.lang.Object read(java.io.DataInputStream pIn) throws java.lang.Exception
read
in interface ISerializer
pIn
- stream with serialized content
java.lang.Exception
- if deserialization failspublic final void write(java.io.DataOutputStream pOut, java.lang.Object pObject) throws java.lang.Exception
write
in interface ISerializer
pOut
- output stream for the objectpObject
- serializable object
java.lang.Exception
- if serialization failspublic final java.lang.Object read(java.io.DataInputStream pIn, TypeCache pCache) throws java.lang.Exception
pIn
- stream with serialized contentpCache
- the cache for optimized bean transfer
java.lang.Exception
- if deserialization failspublic final void write(java.io.DataOutputStream pOut, java.lang.Object pObject, TypeCache pCache) throws java.lang.Exception
pOut
- output stream for the objectpObject
- serializable objectpCache
- the cache for optimized bean transfer
java.lang.Exception
- if serialization failspublic void registerTypeSerializer(ITypeSerializer pTypeSerializer)
pTypeSerializer
- the type serializer.
java.lang.IllegalArgumentException
- if the byte range is already usedpublic void unregisterTypeSerializer(ITypeSerializer pTypeSerializer)
pTypeSerializer
- the type serializer.public ITypeSerializer getTypeSerializer(int pTypeValue) throws java.io.IOException
pTypeValue
- the type value.
java.io.IOException
- if the type value is unknown.public ITypeSerializer getTypeSerializer(java.lang.Class<?> pTypeClass) throws java.io.IOException
pTypeClass
- the type value.
java.io.IOException
- if the type value is unknown.public ITypeSerializer getTypeSerializer(java.lang.Object pObject) throws java.io.IOException
pObject
- the type value.
java.io.IOException
- if the type value is unknown.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |