48 lines
1.4 KiB
Java
48 lines
1.4 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* javax.baja.sys.BFacets
|
|
*/
|
|
package com.tridium.alarm;
|
|
|
|
import java.io.DataInput;
|
|
import java.io.DataOutput;
|
|
import java.io.IOException;
|
|
import javax.baja.sys.BFacets;
|
|
|
|
public class AlarmColumnSpec {
|
|
public final String name;
|
|
public final String displayName;
|
|
public final BFacets facets;
|
|
|
|
public void write(DataOutput dataOutput) throws IOException {
|
|
dataOutput.writeUTF(this.name);
|
|
dataOutput.writeUTF(this.displayName);
|
|
if (this.facets.isNull()) {
|
|
dataOutput.writeBoolean(false);
|
|
} else {
|
|
dataOutput.writeBoolean(true);
|
|
dataOutput.writeUTF(this.facets.encodeToString());
|
|
}
|
|
}
|
|
|
|
public static AlarmColumnSpec read(DataInput dataInput) throws IOException {
|
|
String string = dataInput.readUTF();
|
|
String string2 = dataInput.readUTF();
|
|
boolean bl = dataInput.readBoolean();
|
|
BFacets bFacets = null;
|
|
if (bl) {
|
|
bFacets = (BFacets)BFacets.DEFAULT.decodeFromString(dataInput.readUTF());
|
|
}
|
|
return new AlarmColumnSpec(string, string2, bFacets);
|
|
}
|
|
|
|
public AlarmColumnSpec(String string, String string2, BFacets bFacets) {
|
|
this.name = string;
|
|
this.displayName = string2;
|
|
this.facets = bFacets == null ? BFacets.NULL : bFacets;
|
|
}
|
|
}
|
|
|