Example #1
0
 /** {@inheritDoc} */
 @Override
 public Data restore(byte[] buffer) {
   long id = Storable.Utils.getLong(buffer, 0);
   return new Data(id);
 }
Example #2
0
 /** {@inheritDoc} */
 @Override
 public byte[] getBuffer() throws StorageException {
   byte[] buffer = new byte[8];
   Storable.Utils.putLong(id, buffer, 0);
   return buffer;
 }