コード例 #1
0
 private DirectBytes getKeyAsBytes(K key) {
   DirectBytes bytes = acquireBytes();
   if (generatedKeyType) ((BytesMarshallable) key).writeMarshallable(bytes);
   else bytes.writeInstance(kClass, key);
   bytes.flip();
   return bytes;
 }
コード例 #2
0
 private void appendInstance(DirectBytes bytes, V value) {
   bytes.clear();
   if (builder.generatedValueType()) ((BytesMarshallable) value).writeMarshallable(bytes);
   else bytes.writeInstance(vClass, value);
   bytes.flip();
   if (bytes.remaining() > tmpBytes.remaining())
     throw new IllegalArgumentException(
         "Value too large for entry was "
             + bytes.remaining()
             + ", remaining: "
             + tmpBytes.remaining());
   tmpBytes.write(bytes);
 }