Exemple #1
0
 public void setBody(ByteBuffer buffer) throws MSGException {
   try {
     msgId = Tools.bytesToLong(buffer.removeBytes(8).getBuffer());
     result = buffer.removeByte();
   } catch (NotEnoughDataInByteBufferException e) {
     throw new MSGException(e);
   }
 }
Exemple #2
0
 public ByteBuffer getBody() {
   ByteBuffer buffer = new ByteBuffer();
   buffer.appendBytes(Tools.longToBytes(msgId));
   buffer.appendByte((byte) result);
   return buffer;
 }