Java Byte Array to Object deserialize(byte[] bytes)

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

Description

deserialize

License

Open Source License

Declaration

public static <T> T deserialize(byte[] bytes) throws IOException, ClassNotFoundException 

Method Source Code


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

import java.io.*;

public class Main {
    public static <T> T deserialize(byte[] bytes) throws IOException, ClassNotFoundException {
        try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes))) {
            return (T) in.readObject();
        }/*from   ww w . j  a  v a 2 s.  co m*/
    }
}

Related

  1. deserialize(byte[] byteArray)
  2. deserialize(byte[] bytes)
  3. deserialize(byte[] bytes)
  4. deserialize(byte[] bytes)
  5. deserialize(byte[] bytes)
  6. deserialize(byte[] bytes)
  7. deserialize(byte[] bytes)
  8. deserialize(byte[] bytes)
  9. deserialize(byte[] bytes)