46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
/*
|
|
* 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 class FoxObject
|
|
extends FoxTuple {
|
|
public String encoding;
|
|
public byte[] data;
|
|
public int length;
|
|
|
|
public FoxObject(String string, String string2, byte[] byArray, int n) {
|
|
this.name = string;
|
|
this.encoding = string2;
|
|
this.data = byArray;
|
|
this.length = n;
|
|
}
|
|
|
|
public FoxObject() {
|
|
}
|
|
|
|
public final int getType() {
|
|
return 111;
|
|
}
|
|
|
|
protected final void writeValue(MessageWriter messageWriter) throws IOException {
|
|
messageWriter.writeName(this.encoding).write(32).writeInt(this.length).write(91).write(this.data, 0, this.length).write(93);
|
|
}
|
|
|
|
protected void readValue(MessageReader messageReader) throws IOException {
|
|
this.encoding = messageReader.readName();
|
|
messageReader.consume(32);
|
|
this.length = messageReader.readInt();
|
|
messageReader.consume(91);
|
|
this.data = new byte[this.length];
|
|
messageReader.readFully(this.data, 0, this.length);
|
|
messageReader.consume(93);
|
|
}
|
|
}
|
|
|