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

58 lines
1.4 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 final class FoxBlob
extends FoxTuple {
public byte[] data;
public int offset;
public int length;
public FoxBlob(String string, byte[] byArray, int n) {
this.name = string;
this.data = byArray;
this.offset = 0;
this.length = n;
}
public FoxBlob(String string, byte[] byArray, int n, int n2) {
this.name = string;
this.data = byArray;
this.offset = n;
this.length = n2;
}
public FoxBlob(String string, byte[] byArray) {
this.name = string;
this.data = byArray;
this.offset = 0;
this.length = byArray.length;
}
public FoxBlob() {
}
public final int getType() {
return 98;
}
protected final void writeValue(MessageWriter messageWriter) throws IOException {
messageWriter.writeInt(this.length).write(91).write(this.data, this.offset, this.length).write(93);
}
protected void readValue(MessageReader messageReader) throws IOException {
this.length = messageReader.readInt();
messageReader.consume(91);
this.data = new byte[this.length];
messageReader.readFully(this.data, 0, this.length);
messageReader.consume(93);
}
}