Example #1
0
 /**
  * Private method used by the native code to initialize the data pointers and call a DataDecoder.
  */
 private void decodeData(long newDataAddress, int newDataSize, DataDecoder theDecoder) {
   dataAddress = newDataAddress;
   highWaterMark = newDataSize;
   dataFetchOffset = 0;
   theDecoder.decodeData(this);
   /* clear the dataAddress, so no one will be tempted to abuse this information through pirate copies of the
   MemoryObject. We have to do this because the memory pointed to by data is not under our control */
   dataAddress = 0;
   highWaterMark = 0;
 }
Example #2
0
 @Override
 public DecodeResult decodeFromBytes(byte[] bytes, int offset) {
   Double v = DataDecoder.decodeDoubleObj(bytes, offset);
   return new DecodeResult(v, getLength(v));
 }