Esempio n. 1
0
 /** Claim the given amount of memory at the end of the buffer, resizing it if needed. */
 void claimMemory(int size) {
   mEncoderState.claimMemory(BindingsHelper.align(size));
 }
Esempio n. 2
0
 /**
  * Encode a {@link DataHeader} and claim the amount of memory required for the data section
  * (resizing the buffer if required).
  */
 public void encode(DataHeader s) {
   mEncoderState.claimMemory(BindingsHelper.align(s.size));
   encode(s.size, DataHeader.SIZE_OFFSET);
   encode(s.elementsOrVersion, DataHeader.ELEMENTS_OR_VERSION_OFFSET);
 }