51 lines
1.5 KiB
Java
51 lines
1.5 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package com.tridium.sys;
|
|
|
|
import com.tridium.sys.BootEnv;
|
|
import com.tridium.sys.Nre;
|
|
import java.io.BufferedInputStream;
|
|
import java.io.File;
|
|
import java.io.FileInputStream;
|
|
import java.io.InputStream;
|
|
|
|
public class DefaultBootEnv
|
|
implements BootEnv {
|
|
public File getBajaHome() {
|
|
File file;
|
|
String string = System.getProperty("baja.home");
|
|
if (string == null) {
|
|
Nre.fatal("Missing \"baja.home\" system property");
|
|
}
|
|
if (!(file = new File(string.replace('/', File.separatorChar))).exists()) {
|
|
Nre.fatal("Invalid dir for 'baja.home': " + string);
|
|
}
|
|
return file;
|
|
}
|
|
|
|
public File findModule(String string) throws Exception {
|
|
File file;
|
|
File file2 = new File(Nre.bajaHome, "modules" + File.separator + string + ".jar");
|
|
if (!file2.exists() && (file = new File(Nre.bajaHome, "modules" + File.separator + string + ".sjar")).exists()) {
|
|
return file;
|
|
}
|
|
return file2;
|
|
}
|
|
|
|
public File findTimeZoneDatabase() throws Exception {
|
|
File file = new File(Nre.bajaHome, "lib" + File.separator + "timezones.jar");
|
|
return file.exists() ? file : null;
|
|
}
|
|
|
|
public boolean isRemote() {
|
|
return false;
|
|
}
|
|
|
|
public InputStream read(String string) throws Exception {
|
|
string = string.replace('/', File.separatorChar);
|
|
return new BufferedInputStream(new FileInputStream(new File(Nre.bajaHome, string)));
|
|
}
|
|
}
|
|
|