Java Object Deserialize deserialize(byte[] data)

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

Description

deserialize

License

Open Source License

Declaration

public static Object deserialize(byte[] data) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static Object deserialize(byte[] data) {
        ByteArrayInputStream in = new ByteArrayInputStream(data);
        ObjectInputStream is = null;
        try {//  w ww  .  j a  v a  2 s  .c  o  m
            is = new ObjectInputStream(in);
            return is.readObject();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } finally {
            try {
                if (is != null) {
                    is.close();
                }
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return null;
    }
}

Related

  1. deserialize(byte[] data)
  2. deserialize(byte[] data)
  3. deserialize(byte[] data)
  4. deserialize(byte[] data)
  5. deserialize(byte[] data)
  6. deserialize(byte[] features)
  7. deserialize(byte[] in)
  8. deserialize(byte[] in)
  9. Deserialize(byte[] objectBytes)