Package org.jgroups.util
Class ObjectWrapperPrimitive
java.lang.Object
org.jgroups.util.ObjectWrapperPrimitive
- All Implemented Interfaces:
SizeStreamable,Streamable
- Direct Known Subclasses:
ObjectWrapperSerializable
Wraps a primitive object (e.g. Integer, Boolean, byte[], String etc)
- Since:
- 5.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint<T> TvoidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedintReturns the size (in bytes) of the marshalled objecttoString()voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
obj
-
-
Constructor Details
-
ObjectWrapperPrimitive
public ObjectWrapperPrimitive() -
ObjectWrapperPrimitive
-
-
Method Details
-
getObject
public <T> T getObject() -
setObject
-
getLength
public int getLength() -
toString
-
serializedSize
public int serializedSize()Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object- Specified by:
serializedSizein interfaceSizeStreamable
-
writeTo
Description 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- Throws:
IOException
-
readFrom
Description 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- Throws:
IOExceptionClassNotFoundException
-