public Pack readSimplePack(byte [] data) throws IOException { DataInputX d = new DataInputX(data); d.readByte(); // Type byte [] internalData = d.readBlob(); // Body d = new DataInputX(internalData); readInternal(d); return this; }
public MapPack readMapPack() throws IOException { return (MapPack)readPack(); } public void readFully(byte[] b) throws IOException {
public Pack read(DataInputX din) throws IOException { // this.key = din.readLong(); this.time = din.readLong(); this.level = din.readByte(); this.objType = din.readText(); this.objHash = din.readInt(); this.title = din.readText(); this.message = din.readText(); this.tags = (MapValue) din.readValue(); return this; }
public Pack read(DataInputX n) throws IOException { this.time = n.readDecimal(); this.objHash = n.readInt(); this.objType = n.readText(); this.stype = n.readByte(); this.table=(MapValue)n.readValue(); return this; }
public static Step[] toObjects(byte[] buff) throws IOException { if (buff == null) return null; ArrayList<Step> arr = new ArrayList<Step>(); DataInputX din = new DataInputX(buff); while (din.available() > 0) { arr.add(din.readStep()); } return (Step[]) arr.toArray(new Step[arr.size()]); }
public static SpanPack[] toObjects(byte[] buff) throws IOException { if (buff == null) return null; ArrayList<SpanPack> arr = new ArrayList<SpanPack>(); DataInputX din = new DataInputX(buff); while (din.available() > 0) { arr.add((SpanPack) din.readPack()); } return (SpanPack[]) arr.toArray(new SpanPack[arr.size()]); }
public static CounterKey toCounterKey(byte[] param) { try { DataInputX in = new DataInputX(param); CounterKey ck = new CounterKey(); ck.objHash = in.readInt(); ck.counter = in.readText(); ck.timetype = in.readByte(); return ck; } catch (Exception e) { throw new RuntimeException(e); } }
public Step read(DataInputX in) throws IOException { super.read(in); this.stacks = in.readArray(new int[0]); this.threadId = in.readLong(); this.threadName = in.readText(); this.threadState = in.readText(); this.lockOwnerId = in.readLong(); this.lockName = in.readText(); this.lockOwnerName = in.readText(); return this; } }
public Pack read(DataInputX in) throws IOException { this.time = in.readDecimal(); this.objType = in.readText(); this.objHash = (int) in.readDecimal(); this.key = in.readText(); this.data = (MapValue) in.readValue(); return this; }
private boolean writeMTU(byte[] data, int packetSize) { try { if (server_host == null) return false; long pkid = KeyGen.next(); int total = data.length / packetSize; int remainder = data.length % packetSize; if (remainder > 0) total++; int num = 0; for (num = 0; num < data.length / packetSize; num++) { writeMTU(pkid, total, num, packetSize, DataInputX.get(data, num * packetSize, packetSize)); } if (remainder > 0) { writeMTU(pkid, total, num, remainder, DataInputX.get(data, data.length - remainder, remainder)); } return true; } catch (IOException e) { Logger.println("A121", 10, "UDP", e); return false; } }
public Value read(DataInputX in) throws IOException { this.value = in.readArray(new float[0]); return this; }
public Step read(DataInputX in) throws IOException { super.read(in); this.txid = in.readDecimal(); this.hash = (int) in.readDecimal(); this.elapsed = (int) in.readDecimal(); this.threaded= in.readByte(); return this; } }
public byte[] decode(byte[] data) { try { data = dec.doFinal(data); data = new DataInputX(data).readBlob(); return data; } catch (Exception e) { e.printStackTrace(); } return null; }
public static void close(DataInputX in) { try { in.close(); } catch (Exception e) { } }
public Value read(DataInputX in) throws IOException { if (value == null) value = empty; this.value = in.read(4); return this; }
public static Step[] toObjects(byte[] buff) throws IOException { if (buff == null) return null; ArrayList<Step> arr = new ArrayList<Step>(); DataInputX din = new DataInputX(buff); while (din.available() > 0) { arr.add(din.readStep()); } return (Step[]) arr.toArray(new Step[arr.size()]); }
public static SpanPack[] toObjects(byte[] buff) throws IOException { if (buff == null) return null; ArrayList<SpanPack> arr = new ArrayList<SpanPack>(); DataInputX din = new DataInputX(buff); while (din.available() > 0) { arr.add((SpanPack) din.readPack()); } return (SpanPack[]) arr.toArray(new SpanPack[arr.size()]); }