Java Object Serialize and Deserialize deserialise(byte[] bytes)

Here you can find the source of deserialise(byte[] bytes)

Description

deserialise

License

Open Source License

Declaration

public static Object deserialise(byte[] bytes) throws IOException, ClassNotFoundException 

Method Source Code


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

import java.io.IOException;
import java.io.ObjectInputStream;

public class Main {
    public static Object deserialise(byte[] bytes) throws IOException, ClassNotFoundException {
        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
        ObjectInputStream ois = new ObjectInputStream(bais);
        Object object = ois.readObject();
        ois.close();/*from w w w  . j  a  v a 2 s.  c o m*/
        return object;
    }
}

Related

  1. deserialiseFromByteArray(byte b[])
  2. deserializaObjeto(byte[] bytes, Class tipo)
  3. deserialize(final String serializable, final Class valueType)
  4. deserialize(String name)