Java Utililty Methods Object Deserialize

List of utility methods to do Object Deserialize

Description

The list of methods to do Object Deserialize are organized into topic(s).

Method

Objectdeserialize(byte[] data)
Deserializes an object previously written using an ObjectOutputStream.
if (data.length == 0) {
    return null;
return deserialize(new BufferedInputStream(new ByteArrayInputStream(data)));
Objectdeserialize(byte[] data)
deserialize
try (ByteArrayInputStream buffer = new ByteArrayInputStream(data)) {
    try (ObjectInputStream input = new ObjectInputStream(buffer)) {
        return input.readObject();
} catch (Exception e) {
    throw new RuntimeException(e);
Tdeserialize(byte[] data)
deserialize
ByteArrayInputStream bis = new ByteArrayInputStream(data);
ObjectInput in = null;
Object result = null;
try {
    in = new ObjectInputStream(bis);
    result = in.readObject();
    if (!(result instanceof Serializable))
        throw new RuntimeException("Object not of type Serializable");
...
Objectdeserialize(byte[] data)
Deserializes a packet.
ByteArrayInputStream in = new ByteArrayInputStream(data);
ObjectInputStream is = new ObjectInputStream(in);
return is.readObject();
Objectdeserialize(byte[] data)
deserialize
ByteArrayInputStream in = new ByteArrayInputStream(data);
ObjectInputStream is = null;
try {
    is = new ObjectInputStream(in);
    return is.readObject();
} catch (IOException e) {
    e.printStackTrace();
} catch (ClassNotFoundException e) {
...
Listdeserialize(byte[] features)
Deserialize byte array to object List
ByteArrayInputStream bis = new ByteArrayInputStream(features);
ObjectInput in = new ObjectInputStream(bis);
List<Double> result = (List<Double>) in.readObject();
in.close();
return result;
Objectdeserialize(byte[] in)
deserialize
return deserialize(in, Object.class);
Objectdeserialize(byte[] in)
deserialize
Object rv = null;
try {
    if (in != null) {
        ByteArrayInputStream bis = new ByteArrayInputStream(in);
        ObjectInputStream is = new ObjectInputStream(bis);
        rv = is.readObject();
        is.close();
        bis.close();
...
ObjectDeserialize(byte[] objectBytes)
Deserialize a object
ByteArrayInputStream byteStream;
ObjectInput input;
Object object;
byteStream = new ByteArrayInputStream(objectBytes);
input = new ObjectInputStream(byteStream);
object = input.readObject();
input.close();
return object;
...
Objectdeserialize(byte[] objectData)
Deserializes a single object from an array of bytes.
Object object = null;
if (objectData != null) {
    ObjectInputStream in = null;
    ByteArrayInputStream bin = new ByteArrayInputStream(objectData);
    BufferedInputStream bufin = new BufferedInputStream(bin);
    try {
        in = new ObjectInputStream(bufin);
        object = in.readObject();
...