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 ByteArrayserialized-
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 intgetLength()ByteArraygetSerialized()voidreadFrom(java.io.DataInput in)Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedintserializedSize()Returns the size (in bytes) of the marshalled objectObjectWrapperSerializablesetObject(java.lang.Object obj)java.lang.StringtoString()voidwriteTo(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:
setObjectin classObjectWrapperPrimitive
-
getSerialized
public ByteArray getSerialized()
-
getLength
public int getLength()
- Overrides:
getLengthin classObjectWrapperPrimitive
-
toString
public java.lang.String toString()
- Overrides:
toStringin classObjectWrapperPrimitive
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object- Specified by:
serializedSizein interfaceSizeStreamable- Overrides:
serializedSizein classObjectWrapperPrimitive
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOExceptionDescription copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeToin interfaceStreamable- Overrides:
writeToin classObjectWrapperPrimitive- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionDescription copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classObjectWrapperPrimitive- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-