Java Object Serialize and Deserialize deserialize(String name)

Here you can find the source of deserialize(String name)

Description

deserialize

License

Open Source License

Declaration

public static Object deserialize(String name) 

Method Source Code


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

import java.io.FileInputStream;

import java.io.ObjectInputStream;

public class Main {
    public static Object deserialize(String name) {
        //System.out.println("777");
        try {/*from   w  w  w.  ja va 2s  . co  m*/
            //System.out.println("77");

            FileInputStream fileIn = new FileInputStream(name);
            ObjectInputStream in = new ObjectInputStream(fileIn);
            //System.out.println("3");
            Object object = in.readObject();
            in.close();
            fileIn.close();
            return object;
        } catch (Exception i) {
            i.printStackTrace();
            return null;

        }
    }
}

Related

  1. deserialise(byte[] bytes)
  2. deserialiseFromByteArray(byte b[])
  3. deserializaObjeto(byte[] bytes, Class tipo)
  4. deserialize(final String serializable, final Class valueType)
  5. deserialize(String serialized)
  6. deserialize(String serializedObject)
  7. deserialize(String str)
  8. deSerialize(String str)