@Override
 public void serialize(PofWriter pofWriter, Object obj) throws IOException {
   LengthyPofObject o = (LengthyPofObject) obj;
   pofWriter.writeInt(0, o.fields.size());
   for (int i = 1; i <= o.fields.size(); i++) {
     pofWriter.writeObject(i, o.fields.get(i - 1));
   }
   pofWriter.writeRemainder(null);
 }
Пример #2
0
 public void writeExternal(PofWriter writer) throws IOException {
   writer.writeString(0, message);
   writer.writeInt(1, severity);
 }
Пример #3
0
 public void writeExternal(PofWriter pofwriter) throws IOException {
   pofwriter.writeLong(0, id);
   pofwriter.writeDouble(1, amount);
   pofwriter.writeInt(2, quantity);
   pofwriter.writeInt(3, version);
 }