public byte[] encode(byte[] data) { try { data = new DataOutputX().writeBlob(data).toByteArray(); byte[] plainBytes = padding(data); return enc.doFinal(plainBytes); } catch (Exception e) { e.printStackTrace(); } return null; }
public byte[] encode(byte[] data) { try { data = new DataOutputX().writeBlob(data).toByteArray(); byte[] plainBytes = padding(data); return enc.doFinal(plainBytes); } catch (Exception e) { e.printStackTrace(); } return null; }
public byte[] encode(byte[] data) { try { data = new DataOutputX().writeBlob(data).toByteArray(); byte[] plainBytes = padding(data); return enc.doFinal(plainBytes); } catch (Exception e) { e.printStackTrace(); } return null; }
public static byte[] toBytes(Step[] p) { if (p == null) return null; try { DataOutputX dout = new DataOutputX(p.length * 30); for (int i = 0; i < p.length; i++) { dout.writeStep(p[i]); } return dout.toByteArray(); } catch (IOException e) { } return null; }
public boolean add(Pack p) { try { byte[] b = new DataOutputX().writePack(p).toByteArray(); Object ok = queue.push(b); return ok != null; } catch (Exception e) { } return false; }
public byte[] getBytesKey() { try { DataOutputX out = new DataOutputX(); out.writeInt(objHash); out.writeText(counter); out.writeByte(timetype); return out.toByteArray(); } catch (Exception e) { throw new RuntimeException(e); } }
public byte[] getBytesKey() { try { DataOutputX out = new DataOutputX(); out.writeInt(objHash); out.writeText(counter); out.writeByte(timetype); return out.toByteArray(); } catch (Exception e) { throw new RuntimeException(e); } }
public void writeSimple(DataOutputX out) throws IOException { DataOutputX o = new DataOutputX(); writeInternal(o); out.writeBlob(o.toByteArray()); }
private static void sendDirect(Pack p) { try { udpNet.write(new DataOutputX().writePack(p).toByteArray()); } catch (IOException e) { } }
public void writeSimple(DataOutputX out) throws IOException { DataOutputX o = new DataOutputX(); writeInternal(o); out.writeBlob(o.toByteArray()); }
public static void sendDirect(Pack p) { try { udpNet.write(new DataOutputX().writePack(p).toByteArray()); } catch (IOException e) { } } private static void sendDirect(List<byte[]> buff) {
public static void sendDirect(Pack p) { try { udpNet.write(new DataOutputX().writePack(p).toByteArray()); } catch (IOException e) { } } private static void sendDirect(List<byte[]> buff) {
public boolean add(Pack p) { try { byte[] b = new DataOutputX().writePack(p).toByteArray(); Object ok = queue.push(b); return ok != null; } catch (Exception e) { } return false; }
public void writeSimple(DataOutputX out) throws IOException { DataOutputX o = new DataOutputX(); writeInternal(o); out.writeBlob(o.toByteArray()); }
public byte[] getBytesKey() { try { DataOutputX out = new DataOutputX(); out.writeInt(objHash); out.writeText(counter); out.writeByte(timetype); return out.toByteArray(); } catch (Exception e) { throw new RuntimeException(e); } }
public byte[] getBytesKey() { try { DataOutputX out = new DataOutputX(); out.writeInt(objHash); out.writeText(counter); out.writeByte(timetype); return out.toByteArray(); } catch (Exception e) { throw new RuntimeException(e); } }
static public void sendUdpPackToServer(Pack pack){ Configure conf = Configure.getInstance(); try { UdpAgent.sendUdp(conf.net_collector_ip, conf.net_collector_udp_port, new DataOutputX().write(NetCafe.CAFE).writePack(pack).toByteArray()); } catch (Exception e) { e.printStackTrace(); } }
static public void sendRunningInfo(TraceContext traceContext){ MapPack mapPack = traceContext.caculateTemp(); Configure conf = Configure.getInstance(); try { DataOutputX output = new DataOutputX(); output.writeInt(BatchNetFlag.BATCH_RUNNING_INFO); mapPack.write(output); UdpAgent.sendUdp("127.0.0.1", conf.net_local_udp_port, output.toByteArray()); } catch (Exception e) { e.printStackTrace(); } }
private void sendList(int bufferCount, byte[] buffer) throws IOException { DataOutputX out = new DataOutputX(); out.write(NetCafe.CAFE_N); out.writeShort(bufferCount); out.write(buffer); UdpAgent.sendUdp(server, conf.net_collector_udp_port, out.toByteArray()); } }
static private boolean SendMTU(InetAddress IPAddress, int port, long pkid, int total, int num, int packetSize, byte[] data) throws IOException { Configure conf = Configure.getInstance(); DataOutputX out = new DataOutputX(); out.write(NetCafe.CAFE_MTU); out.writeInt(conf.getObjHash()); out.writeLong(pkid); out.writeShort(total); out.writeShort(num); out.writeBlob(data); return sendUdp(IPAddress, port, out.toByteArray()); } }