protected static byte[] longToBuffer(long num) { byte[] buf=new byte[Global.LONG_SIZE]; Bits.writeLong(num, buf, 0); return buf; }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); if(type == DATA) Bits.writeLong(seqno, out); }
/** * Writes a double to a ByteBuffer * @param num the double to be written * @param buf the buffer */ public static void writeDouble(double num, ByteBuffer buf) { writeLong(Double.doubleToLongBits(num), buf); }
/** * Writes a double to an output stream * @param num the double to be written * @param out the output stream */ public static void writeDouble(double num, DataOutput out) throws IOException { writeLong(Double.doubleToLongBits(num), out); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Bits.writeLong(id,out); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Bits.writeLong(seqno,out); out.writeShort(num_seqnos); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Bits.writeLong(seqno,out); out.writeBoolean(flush_ack); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Bits.writeLong(req_id, out); out.writeShort(corrId); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); switch(type) { case MSG: case XMIT_RSP: case HIGHEST_SEQNO: Bits.writeLong(seqno, out); break; case XMIT_REQ: Util.writeAddress(sender, out); break; } }
public void writeTo(DataOutput out) throws Exception { super.writeTo(out); Bits.writeLong(initial_value, out); } }
@Override public void writeTo(DataOutput out) throws Exception { Util.writeAddress(address, out); Bits.writeLong(id, out); }
public void writeTo(DataOutput out) throws Exception { Util.writeAddress(creator, out); Bits.writeLong(id,out); }
public void writeTo(DataOutput out) throws Exception { Bits.writeLong(id,out); Bits.writeInt(frag_id, out); Bits.writeInt(num_frags, out); }