/* * Decompiled with CFR 0.152. */ package com.tridium.fox.message; import com.tridium.fox.message.FoxTuple; import com.tridium.fox.message.MessageReader; import com.tridium.fox.message.MessageWriter; import java.io.IOException; public final class FoxBoolean extends FoxTuple { public boolean value; public FoxBoolean(String string, boolean bl) { this.name = string; this.value = bl; } public FoxBoolean() { } public final int getType() { return 122; } protected final void writeValue(MessageWriter messageWriter) throws IOException { if (this.value) { messageWriter.write(116); } else { messageWriter.write(102); } } protected void readValue(MessageReader messageReader) throws IOException { int n = messageReader.read(); if (n == 116) { this.value = true; } else if (n == 102) { this.value = false; } else { throw messageReader.error("Expecting 't' or 'f', not '" + messageReader.toString(n) + "'"); } } }