+ /**
+ * <p>Return the value for the current entry. The underlying storage for
+ * the returned slice is valid only until the next modification of
+ * the iterator.</p>
+ *
+ * <p>REQUIRES: {@link #isValid()}</p>
+ *
+ * @param value the out-value to receive the retrieved value.
+ * It is using position and limit. Limit is set according to value size.
+ * Supports direct buffer only.
+ * @return The size of the actual value. If the return value is greater than the
+ * length of {@code value}, then it indicates that the size of the
+ * input buffer {@code value} is insufficient and partial result will
+ * be returned.
+ */
+ public int value(ByteBuffer value) {
+ assert (isOwningHandle() && value.isDirect());
+ int result = valueDirect0(nativeHandle_, value, value.position(), value.remaining());
+ value.limit(Math.min(value.position() + result, value.limit()));
+ return result;
+ }
+