Java Object Deserialize deserializeObject(byte[] bytes)

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

Description

deserialize Object

License

Open Source License

Declaration

static public Object deserializeObject(byte[] bytes) throws Exception 

Method Source Code


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

import java.io.*;

public class Main {
    static public Object deserializeObject(byte[] bytes) throws Exception {
        ByteArrayInputStream is = new ByteArrayInputStream(bytes);

        try {//w ww .  j a  va2 s.c  om
            ObjectInputStream ois = new ObjectInputStream(is);

            try {
                return ois.readObject();
            } finally {
                ois.close();
            }
        } finally {
            is.close();
        }
    }
}

Related

  1. deserializeFromByteArray(byte[] in)
  2. deserializeFromBytes(byte[] bytes, Class clazz)
  3. deserializeFromBytes(byte[] serialized, Class clazz)
  4. deserializeFromBytes(byte[] serializedObject)
  5. deserializeObject(byte[] buf)
  6. deserializeObject(byte[] bytes)
  7. deserializeObject(byte[] bytes)
  8. deserializeObject(byte[] bytes)
  9. deserializeObject(byte[] bytes)