Java Object Serialize and Deserialize deSerializeObj(byte[] array)

Here you can find the source of deSerializeObj(byte[] array)

Description

de Serialize Obj

License

Open Source License

Declaration

public static Object deSerializeObj(byte[] array) 

Method Source Code


//package com.java2s;
import java.io.*;

public class Main {
    public static Object deSerializeObj(byte[] array) {
        ByteArrayInputStream bis = new ByteArrayInputStream(array);
        ObjectInputStream ois = null;
        try {/*from w w w .  j a v a 2  s .  c  om*/
            ois = new ObjectInputStream(bis);
            return ois.readObject();
        } catch (Exception e) {
            throw new RuntimeException("deSerializeObj error", e);
        }
    }
}

Related

  1. deserializeAndCheckObject(final byte[] object, final Class type)
  2. deserialized(final byte[] data)
  3. deserializeFromString(String obj)
  4. deserializeGZip(byte[] buf, T obj)
  5. deserializeJdk(byte[] bytes)
  6. deSerializeObject(byte[] base64SerializedObject)
  7. deserializeObject(String dir)
  8. deSerializeObject(String str, Class cls)
  9. deserializeObjectFromByteArray(byte[] data)