Java ObjectOutputStream Write loadSerializedObjectWithExceptions(String fileName)

Here you can find the source of loadSerializedObjectWithExceptions(String fileName)

Description

load Serialized Object With Exceptions

License

Open Source License

Declaration

public static Object loadSerializedObjectWithExceptions(String fileName) throws Exception 

Method Source Code


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

import java.io.*;

public class Main {
    public static Object loadSerializedObjectWithExceptions(String fileName) throws Exception {
        InputStream file = new FileInputStream(fileName);
        InputStream buffer = new BufferedInputStream(file);
        ObjectInput input = new ObjectInputStream(buffer);
        Object object = input.readObject();
        input.close();/*from   w  ww  .  j  a  va  2s. co  m*/

        return object;
    }
}

Related

  1. LoadMatFromFile(double[] mat, String filename)
  2. loadObj(String file)
  3. loadSerializableFile(File file)
  4. loadSerialized(File file)
  5. loadSerializedObject(String fileName)
  6. loadTrace(File file)
  7. save(File f, T o)
  8. save(Object o)
  9. save(Object obj, String path)