Package org.jgroups.util
Class ObjectWrapperSerializable
- java.lang.Object
-
- org.jgroups.util.ObjectWrapperPrimitive
-
- org.jgroups.util.ObjectWrapperSerializable
-
- All Implemented Interfaces:
SizeStreamable
,Streamable
public class ObjectWrapperSerializable extends ObjectWrapperPrimitive
Wraps an object and its serialized form.- Since:
- 5.0.0
- Author:
- Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description protected ByteArray
serialized
-
Fields inherited from class org.jgroups.util.ObjectWrapperPrimitive
obj
-
-
Constructor Summary
Constructors Constructor Description ObjectWrapperSerializable()
ObjectWrapperSerializable(java.lang.Object obj)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLength()
ByteArray
getSerialized()
void
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedint
serializedSize()
Returns the size (in bytes) of the marshalled objectObjectWrapperSerializable
setObject(java.lang.Object obj)
java.lang.String
toString()
void
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.-
Methods inherited from class org.jgroups.util.ObjectWrapperPrimitive
getObject
-
-
-
-
Field Detail
-
serialized
protected ByteArray serialized
-
-
Method Detail
-
setObject
public ObjectWrapperSerializable setObject(java.lang.Object obj)
- Overrides:
setObject
in classObjectWrapperPrimitive
-
getSerialized
public ByteArray getSerialized()
-
getLength
public int getLength()
- Overrides:
getLength
in classObjectWrapperPrimitive
-
toString
public java.lang.String toString()
- Overrides:
toString
in classObjectWrapperPrimitive
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamable
Returns the size (in bytes) of the marshalled object- Specified by:
serializedSize
in interfaceSizeStreamable
- Overrides:
serializedSize
in classObjectWrapperPrimitive
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeTo
in interfaceStreamable
- Overrides:
writeTo
in classObjectWrapperPrimitive
- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Description copied from interface:Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classObjectWrapperPrimitive
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-