mirror of
https://github.com/moparisthebest/MoparClassic
synced 2024-11-15 21:55:03 -05:00
22 lines
566 B
Java
22 lines
566 B
Java
|
package msc.gs.util;
|
||
|
|
||
|
import java.io.File;
|
||
|
import java.io.FileInputStream;
|
||
|
import java.io.ObjectInputStream;
|
||
|
import java.util.zip.GZIPInputStream;
|
||
|
|
||
|
import msc.config.Config;
|
||
|
|
||
|
public class ObjectLoader {
|
||
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|