• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/java/src/com/sleepycat/db/

Lines Matching refs:data

18 Encodes database key and data items as a byte array.
21 are based on key/data pairs. Both key and data items are represented by
22 DatabaseEntry objects. Key and data byte arrays may refer to arrays of zero
27 subclassed, providing a way to associate with it additional data or
39 DatabaseEntry objects are used for both input data (when writing to a
40 database or specifying a search parameter) and output data (when reading
44 data parameter. The documentation for each method describes whether its
48 initializing the data array of the DatabaseEntry. For DatabaseEntry
49 output parameters, the method called will initialize the data array.
52 reuse the byte array in the DatabaseEntry, if the data returned fits in
56 byte array should not be used to determine the amount of data returned each
73 length of the returned data and
78 with a tuple or serial binding the byte array is grown dynamically as data
92 By default the specified data (byte array, offset and size) corresponds to
93 the full stored key or data item. Optionally, the Partial property can be
95 specify the portion of the key or data item to be read or written. For
105 /* Currently, JE stores all data records as byte array */
106 /* package */ byte[] data;
116 * IGNORE is used to avoid returning data that is not needed. It may not
125 IGNORE.setPartial(0, 0, true); // dlen == 0, so no data ever returned
137 Construct a DatabaseEntry with null data. The offset and size are set to
148 @param data
151 public DatabaseEntry(final byte[] data) {
152 this.data = data;
153 if (data != null) {
154 this.size = data.length;
162 @param data
169 public DatabaseEntry(final byte[] data, final int offset, final int size) {
170 this.data = data;
179 @param data
182 public DatabaseEntry(ByteBuffer data) {
183 if (data.isDirect()) {
184 this.data_nio = data;
185 if (data != null) {
186 this.size = this.ulen = data.limit();
187 setUserBuffer(data.limit(), true);
189 } else if (data.hasArray()) {
191 this.data = data.array();
192 if (this.data != null) {
193 this.size = this.data.length;
217 return data;
223 Used to access the underlying data when the DatabaseEntry is
236 @param data
243 public void setData(final byte[] data, final int offset, final int size) {
244 this.data = data;
255 @param data
258 public void setData(final byte[] data) {
259 setData(data, 0, (data == null) ? 0 : data.length);
267 @param data
270 int offset into the ByteBuffer where the DatabaseEntry data begins.
274 public void setDataNIO(final ByteBuffer data, final int offset, final int size) {
275 this.data_nio = data;
279 this.data = null;
289 @param data
292 public void setDataNIO(final ByteBuffer data) {
293 setDataNIO(data, 0, (data == null) ? 0 : data.capacity());
300 * position so that the next set of key/data can be returned.
308 Return the byte offset into the data array.
321 Set the byte offset into the data array.
440 the beginning of the retrieved data record are returned as if they
445 For example, if the data portion of a retrieved record was 100 bytes,
448 the retrieved data would be the last 15 bytes of the record.
452 bytes from the beginning of the specified key's data item are replaced
453 by the data specified by the DatabaseEntry. If the partial length is
454 smaller than the data, the record will grow; if the partial length is
455 larger than the data, the record will shrink. If the specified bytes do
500 return DbUtil.array2int(data, offset);
505 are integer keys starting at 1. When this method is called the data,
512 if (data == null || data.length < INT32SZ) {
513 data = new byte[INT32SZ];
518 DbUtil.int2array(recno, data, 0);
544 " DatabaseEntry classes with a underlying byte[] data");
555 Return the byte size of the data array.
558 will always be the length of the data array.
568 Set the byte size of the data array.
606 The <code>data</code> field of the entry must refer to a buffer that is
611 <code>data</code> field refers. Otherwise, the <code>size</code> field
636 * Compares the data of two entries for byte-by-byte equality.
639 * to the data array length, then only the data bounded by these values is
640 * compared. The data array length and offset need not be the same in both
643 * <p>If the data array is null in one entry, then to be considered equal
644 * both entries must have a null data array.</p>
662 if (data == null && e.data == null) {
665 if (data == null || e.data == null) {
672 if (data[offset + i] != e.data[e.offset + i]) {
680 * Returns a hash code based on the data value.
684 if (data != null) {
686 hash += data[offset + i];