public void write(DataOutputX out) throws IOException { if (value == null) { out.writeShort(0); } else { out.writeShort(value.length); for (int i = 0; i < value.length; i++) { out.writeText(value[i]); } } }
public DataOutputX writeArray(float[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeFloat(v[i]); } } return this; }
public DataOutputX writeArray(float[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeFloat(v[i]); } } return this; }
public DataOutputX writeArray(int[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeInt(v[i]); } } return this; }
public void write(DataOutputX out) throws IOException { if (value == null) { out.writeShort(0); } else { out.writeShort(value.length); for (int i = 0; i < value.length; i++) { out.writeText(value[i]); } } }
public DataOutputX writeArray(long[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeLong(v[i]); } } return this; }
public DataOutputX writeArray(int[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeInt(v[i]); } } return this; }
public DataOutputX writeArray(float[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeFloat(v[i]); } } return this; }
public DataOutputX writeArray(float[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeFloat(v[i]); } } return this; }
public DataOutputX writeArray(long[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeLong(v[i]); } } return this; }
public DataOutputX writeArray(long[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeLong(v[i]); } } return this; }
public DataOutputX writeArray(int[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeInt(v[i]); } } return this; }
public DataOutputX writeArray(long[] v) throws IOException { if (v == null) { writeShort(0); } else { writeShort(v.length); for (int i = 0; i < v.length; i++) { writeLong(v[i]); } } return this; }
public DataOutputX writeShortBytes(byte[] b) throws IOException { this.writeShort(b.length); this.write(b); return this; }
public DataOutputX writeShortBytes(byte[] b) throws IOException { this.writeShort(b.length); this.write(b); return this; }
public DataOutputX writeShortBytes(byte[] b) throws IOException { this.writeShort(b.length); this.write(b); return this; }
private void sendList(int bufferCount, byte[] buffer) throws IOException { DataOutputX outter = new DataOutputX(); outter.write(NetCafe.CAFE_N); outter.writeShort(bufferCount); outter.write(buffer); byte[] buff = outter.toByteArray(); DatagramPacket packet = new DatagramPacket(buff, buff.length); packet.setAddress(server_host); packet.setPort(server_port); datagram.send(packet); } public boolean debugWrite(String ip, int port, int length) {
private void sendList(int bufferCount, byte[] buffer) throws IOException { DataOutputX outter = new DataOutputX(); outter.write(NetCafe.CAFE_N); outter.writeShort(bufferCount); outter.write(buffer); byte[] buff = outter.toByteArray(); DatagramPacket packet = new DatagramPacket(buff, buff.length); packet.setAddress(server_host); packet.setPort(server_port); datagram.send(packet); } public boolean debugWrite(String ip, int port, int length) {
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()); } }
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()); } }