public void storeCheckpoint(OutputBuffer buffer) throws IOException { if (logger.level <= Logger.FINER) logger.log("storeCheckpoint " + nextSendTime); buffer.writeInt(31173); buffer.writeLong(nextSendTime); buffer.writeBoolean(dest != null); if (dest != null) dest.serialize(buffer); ByteArrayOutputStream baos = new ByteArrayOutputStream(); new ObjectOutputStream(baos).writeObject(rand); byte[] bytes = baos.toByteArray(); buffer.writeInt(bytes.length); buffer.write(bytes, 0, bytes.length); if (logger.level <= Logger.FINEST) logger.log("storeCheckpoint:" + Arrays.toString(((SimpleOutputBuffer) buffer).getBytes())); }
public void serialize(rice.p2p.commonapi.rawserialization.OutputBuffer buf) throws IOException { for (int i = 0; i < Id.length; i++) { buf.writeInt(Id[i]); } }
public void serialize(OutputBuffer buf) throws IOException { buf.writeInt(id); }