Java ObjectOutputStream Write loadSerializableFile(File file)

Here you can find the source of loadSerializableFile(File file)

Description

load Serializable File

License

Apache License

Declaration

public static synchronized Serializable loadSerializableFile(File file)
            throws IOException, ClassNotFoundException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.*;

public class Main {
    public static synchronized Serializable loadSerializableFile(File file)
            throws IOException, ClassNotFoundException {
        Serializable result = null;
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file));
        result = (Serializable) ois.readObject();
        ois.close();//from  w  w w  .j a va2  s  .com
        return result;
    }
}

Related

  1. loadData(Class expectedClass, String filename)
  2. loadData(HashMap data, String filename)
  3. loadGZipObject(File file)
  4. LoadMatFromFile(double[] mat, String filename)
  5. loadObj(String file)
  6. loadSerialized(File file)
  7. loadSerializedObject(String fileName)
  8. loadSerializedObjectWithExceptions(String fileName)
  9. loadTrace(File file)