public final class Serializables extends Object
| Modifier and Type | Method and Description |
|---|---|
static ByteBuffer |
getBytes(Serializable object)
|
static <T extends Serializable> |
read(ByteBuffer bytes,
Class<T> classObj)
Read back the serialized object of class
classObj from the
specified sequence of bytes. |
static <T extends Serializable> |
read(ByteBuffer bytes,
String className)
Read back the serialized object of
className from the specified
sequence of bytes. |
static void |
write(Serializable object,
FileChannel channel)
Write
object to channel starting at the channel's current
position. |
public static ByteBuffer getBytes(Serializable object)
object - public static <T extends Serializable> T read(ByteBuffer bytes, Class<T> classObj)
classObj from the
specified sequence of bytes.bytes - classObj - public static <T extends Serializable> T read(ByteBuffer bytes, String className)
className from the specified
sequence of bytes.bytes - className - public static void write(Serializable object, FileChannel channel)
object to channel starting at the channel's current
position.object - channel -