Пример #1
0
 public void serialize(OutputBuffer buf) throws IOException {
   from.serialize(buf);
   buf.writeFloat(x);
   buf.writeFloat(y);
   buf.writeFloat(z);
   buf.writeFloat(rw);
   buf.writeFloat(rx);
   buf.writeFloat(ry);
   buf.writeFloat(rz);
   buf.writeUTF(name);
 }
 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()));
 }
Пример #3
0
 public void serialize(OutputBuffer buf) throws IOException {
   boolean hasSource = (source != null);
   buf.writeBoolean(hasSource);
   if (hasSource) source.serialize(buf);
   topic.serialize(buf);
 }
Пример #4
0
 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);
 }
 public void serialize(OutputBuffer buf) throws IOException {
   buf.writeUTF(name);
   id.serialize(buf);
 }