2026-03-17 13:31:18 -07:00

124 lines
3.8 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.tridium.fox.session.FoxCircuit
* com.tridium.fox.session.FoxRequest
* com.tridium.fox.session.FoxResponse
* com.tridium.fox.session.InvalidCommandException
* com.tridium.fox.sys.BFoxChannel
* javax.baja.file.BFileSystem
* javax.baja.file.BIFile
* javax.baja.file.FilePath
* javax.baja.file.FileUtil
* javax.baja.sys.Sys
* javax.baja.sys.Type
*/
package com.tridium.platform.fox;
import com.tridium.fox.session.FoxCircuit;
import com.tridium.fox.session.FoxRequest;
import com.tridium.fox.session.FoxResponse;
import com.tridium.fox.session.InvalidCommandException;
import com.tridium.fox.sys.BFoxChannel;
import java.io.InputStream;
import java.io.OutputStream;
import javax.baja.file.BFileSystem;
import javax.baja.file.BIFile;
import javax.baja.file.FilePath;
import javax.baja.file.FileUtil;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BTimeChannel
extends BFoxChannel {
public static final Type TYPE;
static /* synthetic */ Class class$com$tridium$platform$fox$BTimeChannel;
public Type getType() {
return TYPE;
}
public FoxResponse process(FoxRequest foxRequest) throws Exception {
String string = foxRequest.command;
throw new InvalidCommandException(string);
}
public void circuitOpened(FoxCircuit foxCircuit) throws Exception {
String string = foxCircuit.command;
if (string == "gettimezones") {
this.gettimezones(foxCircuit);
return;
}
throw new InvalidCommandException(string);
}
public InputStream gettimezones() throws Exception {
if (this.isTraceOn()) {
this.trace("c:gettimezones");
}
FoxCircuit foxCircuit = this.openCircuit("gettimezones");
return foxCircuit.getInputStream();
}
/*
* WARNING - Removed back jump from a try to a catch block - possible behaviour change.
* Enabled aggressive block sorting
* Enabled unnecessary exception pruning
* Enabled aggressive exception aggregation
*/
public void gettimezones(FoxCircuit foxCircuit) throws Exception {
if (this.isTraceOn()) {
this.trace("s:gettimezones");
}
FilePath filePath = new FilePath("!lib/timezones.jar");
BIFile bIFile = BFileSystem.INSTANCE.resolveFile(filePath);
long l = bIFile.getSize();
InputStream inputStream = bIFile.getInputStream();
OutputStream outputStream = foxCircuit.getOutputStream();
try {
FileUtil.pipe((InputStream)inputStream, (long)l, (OutputStream)outputStream);
}
catch (Throwable throwable) {
Object var9_8 = null;
inputStream.close();
foxCircuit.close();
throw throwable;
}
{
Object var9_9 = null;
}
inputStream.close();
foxCircuit.close();
}
static /* synthetic */ Class class(String string, boolean bl) {
try {
Class<?> clazz = Class.forName(string);
if (!bl) {
clazz = clazz.getComponentType();
}
return clazz;
}
catch (ClassNotFoundException classNotFoundException) {
throw new NoClassDefFoundError(classNotFoundException.getMessage());
}
}
public BTimeChannel() {
super("time");
}
static {
Class clazz = class$com$tridium$platform$fox$BTimeChannel;
if (clazz == null) {
clazz = class$com$tridium$platform$fox$BTimeChannel = BTimeChannel.class("[Lcom.tridium.platform.fox.BTimeChannel;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}