Java ObjectOutputStream Write loadObj(String file)

Here you can find the source of loadObj(String file)

Description

load Obj

License

Apache License

Declaration

public static Object loadObj(String file) throws FileNotFoundException, IOException, ClassNotFoundException 

Method Source Code


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

import java.io.FileInputStream;
import java.io.FileNotFoundException;

import java.io.IOException;
import java.io.ObjectInputStream;

public class Main {
    public static Object loadObj(String file) throws FileNotFoundException, IOException, ClassNotFoundException {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file));
        Object qa = ois.readObject();
        ois.close();//w  w w .  j a  va2s .c  o  m
        return qa;
    }
}

Related

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