Java Object Deserialize deserialize(byte[] data)

Here you can find the source of deserialize(byte[] data)

Description

deserialize

License

Apache License

Declaration

public static <T> T deserialize(byte[] data) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.*;

public class Main {
    public static <T> T deserialize(byte[] data) {
        try {/*w  w w  .ja va 2 s.  c o m*/
            ByteArrayInputStream in = new ByteArrayInputStream(data);
            ObjectInputStream ois = new ObjectInputStream(in);
            return (T) ois.readObject();
        } catch (Exception e) {
            e.printStackTrace();
        }

        return null;
    }
}

Related

  1. deserialize(byte[] bytes, Class clazz)
  2. deserialize(byte[] bytes, Class clazz)
  3. deserialize(byte[] bytes, Class klass)
  4. deserialize(byte[] bytes, final Class asClass)
  5. deserialize(byte[] bytes, List customClassLoaders)
  6. deserialize(byte[] data)
  7. deserialize(byte[] data)
  8. deserialize(byte[] data)
  9. deserialize(byte[] data)