2011-05-13 04:24:42 -04:00
|
|
|
package org.moparscape.msc.gs.util;
|
2011-04-27 01:44:26 -04:00
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
import java.io.ObjectInputStream;
|
|
|
|
import java.util.zip.GZIPInputStream;
|
|
|
|
|
2011-05-13 04:24:42 -04:00
|
|
|
import org.moparscape.msc.config.Config;
|
|
|
|
|
2011-04-27 01:44:26 -04:00
|
|
|
public class ObjectLoader {
|
2011-06-25 01:44:53 -04:00
|
|
|
public static Object loadObject(String file) {
|
|
|
|
try {
|
|
|
|
ObjectInputStream in = new ObjectInputStream(new GZIPInputStream(
|
|
|
|
new FileInputStream(new File(Config.CONF_DIR,
|
|
|
|
"data/ground.gz"))));
|
|
|
|
Object temp = in.readObject();
|
|
|
|
in.close();
|
|
|
|
return temp;
|
|
|
|
} catch (Exception e) {
|
|
|
|
Logger.error(e);
|
|
|
|
return null;
|
|
|
|
}
|
2011-04-27 01:44:26 -04:00
|
|
|
}
|
|
|
|
}
|