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

67 lines
1.5 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package com.tridium.alarm;
import java.io.DataInput;
import java.io.IOException;
import java.io.InputStream;
import javax.baja.alarm.BAlarmRecord;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class AlarmInput {
private DataInput in;
private BAlarmRecord rec;
private boolean unique;
public void setUniqueRecords(boolean bl) {
this.unique = bl;
}
public BAlarmRecord read() throws IOException {
BAlarmRecord bAlarmRecord = null;
boolean bl = this.in.readBoolean();
if (!bl) {
return null;
}
if (this.unique) {
bAlarmRecord = new BAlarmRecord();
} else {
if (this.rec == null) {
this.rec = new BAlarmRecord();
}
bAlarmRecord = this.rec;
}
try {
bAlarmRecord.read(this.in);
}
catch (Exception exception) {
System.out.println("? end of input ?");
exception.printStackTrace();
return null;
}
return bAlarmRecord;
}
public void close() {
if (this.in instanceof InputStream) {
try {
((InputStream)((Object)this.in)).close();
}
catch (Exception exception) {}
}
}
private final /* synthetic */ void this() {
this.unique = true;
}
public AlarmInput(DataInput dataInput) throws IOException {
this.this();
this.in = dataInput;
}
}