From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/java/com/sleepycat/db/DatabaseEntry.html | 1846 ++++++++++++------------- 1 file changed, 882 insertions(+), 964 deletions(-) (limited to 'docs/java/com/sleepycat/db/DatabaseEntry.html') diff --git a/docs/java/com/sleepycat/db/DatabaseEntry.html b/docs/java/com/sleepycat/db/DatabaseEntry.html index 3cc52800..4e9e6670 100644 --- a/docs/java/com/sleepycat/db/DatabaseEntry.html +++ b/docs/java/com/sleepycat/db/DatabaseEntry.html @@ -1,112 +1,111 @@ - - - - - -DatabaseEntry (Oracle - Berkeley DB Java API) - - - - - - - - - - - - -
- - +//--> + + - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-

- -com.sleepycat.db -
-Class DatabaseEntry

-
-java.lang.Object
-  extended by com.sleepycat.db.DatabaseEntry
-
-
-
Direct Known Subclasses:
MultipleEntry
-
-
-
-
public class DatabaseEntry
extends Object
- - -

-Encodes database key and data items as a byte array. +

+
com.sleepycat.db
+

Class DatabaseEntry

+
+
+ +
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    MultipleEntry
    +
    +
    +
    +
    public class DatabaseEntry
    +extends java.lang.Object
    +
    Encodes database key and data items as a byte array.

    -Storage and retrieval for the Database and Cursor methods +Storage and retrieval for the Database and Cursor methods are based on key/data pairs. Both key and data items are represented by DatabaseEntry objects. Key and data byte arrays may refer to arrays of zero length up to arrays of essentially unlimited length. @@ -118,10 +117,10 @@ references to other structures.

    Access to DatabaseEntry objects is not re-entrant. In particular, if multiple threads simultaneously access the same DatabaseEntry object using -Database or Cursor methods, the results are undefined. +Database or Cursor methods, the results are undefined.

    DatabaseEntry objects may be used in conjunction with the object mapping -support provided in the com.sleepycat.bind package. +support provided in the com.sleepycat.bind package.

    Input and Output Parameters

    @@ -129,7 +128,7 @@ DatabaseEntry objects are used for both input data (when writing to a database or specifying a search parameter) and output data (when reading from a database). For certain methods, one parameter may be an input parameter and another may be an output parameter. For example, the -Database.get(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode) method has an input key parameter and an output +Database.get(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode) method has an input key parameter and an output data parameter. The documentation for each method describes whether its parameters are input or output parameters.

    @@ -139,15 +138,15 @@ output parameters, the method called will initialize the data array.

    For DatabaseEntry output parameters, by default the method called will reuse the byte array in the DatabaseEntry, if the data returned fits in -the byte array. This behavior can be configured with setReuseBuffer(boolean) or setUserBuffer(int, boolean). If an entry is configured to +the byte array. This behavior can be configured with setReuseBuffer(boolean) or setUserBuffer(int, boolean). If an entry is configured to reuse the byte array (the default behavior), the length of the underlying byte array should not be used to determine the amount of data returned each -time the entry is used as an output parameter, rather the getSize() +time the entry is used as an output parameter, rather the getSize() call should be used. If an entry is configured to not reuse the byte array, a new array is allocated each time the entry is used as an output parameter, so the application can safely keep a reference to the byte array returned -by getData() without danger that the array will be overwritten in +by getData() without danger that the array will be overwritten in a subsequent call.

    Offset and Size Properties

    @@ -181,662 +180,608 @@ By default the specified data (byte array, offset and size) corresponds to the full stored key or data item. Optionally, the Partial property can be set to true, and the PartialOffset and PartialLength properties are used to specify the portion of the key or data item to be read or written. For -details, see the setPartial(int,int,boolean) method. +details, see the setPartial(int,int,boolean) method.

    Note that the Partial properties are set only by the caller. They will never be set by a Database or Cursor method, nor will they every be set by bindings. Therefore, the application can assume that the Partial properties -are not set, unless the application itself sets them explicitly. -

    - -

    -


    - -

    - +are not set, unless the application itself sets them explicitly.

    +
  • +
+
+
+
    +
  • - - - - - - - - - - - - - - - - - - -
    -Constructor Summary
    DatabaseEntry() - -
    -          Construct a DatabaseEntry with null data.
    DatabaseEntry(byte[] data) - -
    -          Construct a DatabaseEntry with a given byte array.
    DatabaseEntry(byte[] data, - int offset, - int size) - -
    -          Constructs a DatabaseEntry with a given byte array, offset and size.
    DatabaseEntry(ByteBuffer data) - -
    -          Construct a DatabaseEntry with a given native I/O buffer.
    -  +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      DatabaseEntry() +
      Construct a DatabaseEntry with null data.
      +
      DatabaseEntry(byte[] data) +
      Construct a DatabaseEntry with a given byte array.
      +
      DatabaseEntry(byte[] data, + int offset, + int size) +
      Constructs a DatabaseEntry with a given byte array, offset and size.
      +
      DatabaseEntry(java.nio.ByteBuffer data) +
      Construct a DatabaseEntry with a given native I/O buffer.
      +
      +
    • +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -Method Summary
    - booleanequals(Object o) - -
    -          Compares the data of two entries for byte-by-byte equality.
    - byte[]getData() - -
    -          Return the byte array.
    - ByteBuffergetDataNIO() - -
    -          Return the java.nio.ByteBuffer.
    - intgetOffset() - -
    -          Return the byte offset into the data array.
    - booleangetPartial() - -
    -          Return whether this DatabaseEntry is configured to read or write partial - records.
    - intgetPartialLength() - -
    -          Return the byte length of the partial record being read or written by - the application, in bytes.
    - intgetPartialOffset() - -
    -          Return the offset of the partial record being read or written by the - application, in bytes.
    - booleangetReadOnly() - -
    -          Return whether this DatabaseEntry is configured as read only.
    - intgetRecordNumber() - -
    -          Return the record number encoded in this entry's buffer.
    - booleangetReuseBuffer() - -
    -          Return true if the whether the entry is configured to reuse the buffer.
    - intgetSize() - -
    -          Return the byte size of the data array.
    - booleangetUserBuffer() - -
    -          Return true if the whether the buffer in this entry is owned by the - application.
    - intgetUserBufferLength() - -
    -          Return the length of the application's buffer.
    - inthashCode() - -
    -          Returns a hash code based on the data value.
    - voidsetData(byte[] data) - -
    -          Sets the byte array.
    - voidsetData(byte[] data, - int offset, - int size) - -
    -          Sets the byte array, offset and size.
    - voidsetDataNIO(ByteBuffer data) - -
    -          Sets the java.nio.ByteBuffer.
    - voidsetDataNIO(ByteBuffer data, - int offset, - int size) - -
    -          Sets the java.nio.ByteBuffer (or the backing array if passed a non-direct - ByteBuffer,) offset and size.
    - voidsetOffset(int offset) - -
    -          Set the byte offset into the data array.
    - voidsetPartial(boolean partial) - -
    -          Configure this DatabaseEntry to read or write partial records.
    - voidsetPartial(int doff, - int dlen, - boolean partial) - -
    -          Configures this DatabaseEntry to read or write partial records.
    - voidsetPartialLength(int dlen) - -
    -          Set the byte length of the partial record being read or written by - the application, in bytes.
    - voidsetPartialOffset(int doff) - -
    -          Set the offset of the partial record being read or written by the - application, in bytes.
    - voidsetReadOnly(boolean readonly) - -
    -          Configure this DatabaseEntry as read only.
    - voidsetRecordNumber(int recno) - -
    -          Initialize the entry from a logical record number.
    - voidsetReuseBuffer(boolean reuse) - -
    -          Configures the entry to try to reuse the buffer before allocating a new - one.
    - voidsetSize(int size) - -
    -          Set the byte size of the data array.
    - voidsetUserBuffer(int length, - boolean usermem) - -
    -          Configures the entry with an application-owned buffer.
    - - - - - - - -
    Methods inherited from class java.lang.Object
    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    -  -

    - +

      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      booleanequals(java.lang.Object o) +
      Compares the data of two entries for byte-by-byte equality.
      +
      booleangetBlob() +
      Return whether this DatabaseEntry is configured to be stored as a blob.
      +
      byte[]getData() +
      Return the byte array.
      +
      java.nio.ByteBuffergetDataNIO() +
      Return the java.nio.ByteBuffer.
      +
      intgetOffset() +
      Return the byte offset into the data array.
      +
      booleangetPartial() +
      Return whether this DatabaseEntry is configured to read or write partial + records.
      +
      intgetPartialLength() +
      Return the byte length of the partial record being read or written by + the application, in bytes.
      +
      intgetPartialOffset() +
      Return the offset of the partial record being read or written by the + application, in bytes.
      +
      booleangetReadOnly() +
      Return whether this DatabaseEntry is configured as read only.
      +
      intgetRecordNumber() +
      Return the record number encoded in this entry's buffer.
      +
      booleangetReuseBuffer() +
      Return true if the whether the entry is configured to reuse the buffer.
      +
      intgetSize() +
      Return the byte size of the data array.
      +
      booleangetUserBuffer() +
      Return true if the whether the buffer in this entry is owned by the + application.
      +
      intgetUserBufferLength() +
      Return the length of the application's buffer.
      +
      inthashCode() +
      Returns a hash code based on the data value.
      +
      voidsetBlob(boolean blob) +
      Configure this DatabaseEntry to be stored as a blob.
      +
      voidsetData(byte[] data) +
      Sets the byte array.
      +
      voidsetData(byte[] data, + int offset, + int size) +
      Sets the byte array, offset and size.
      +
      voidsetDataNIO(java.nio.ByteBuffer data) +
      Sets the java.nio.ByteBuffer.
      +
      voidsetDataNIO(java.nio.ByteBuffer data, + int offset, + int size) +
      Sets the java.nio.ByteBuffer (or the backing array if passed a non-direct + ByteBuffer,) offset and size.
      +
      voidsetOffset(int offset) +
      Set the byte offset into the data array.
      +
      voidsetPartial(boolean partial) +
      Configure this DatabaseEntry to read or write partial records.
      +
      voidsetPartial(int doff, + int dlen, + boolean partial) +
      Configures this DatabaseEntry to read or write partial records.
      +
      voidsetPartialLength(int dlen) +
      Set the byte length of the partial record being read or written by + the application, in bytes.
      +
      voidsetPartialOffset(int doff) +
      Set the offset of the partial record being read or written by the + application, in bytes.
      +
      voidsetReadOnly(boolean readonly) +
      Configure this DatabaseEntry as read only.
      +
      voidsetRecordNumber(int recno) +
      Initialize the entry from a logical record number.
      +
      voidsetReuseBuffer(boolean reuse) +
      Configures the entry to try to reuse the buffer before allocating a new + one.
      +
      voidsetSize(int size) +
      Set the byte size of the data array.
      +
      voidsetUserBuffer(int length, + boolean usermem) +
      Configures the entry with an application-owned buffer.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • - - - - - - -
    -Constructor Detail
    - -

    -DatabaseEntry

    -
    -public DatabaseEntry()
    -
    -
    Construct a DatabaseEntry with null data. The offset and size are set to - zero. -

    -

    -
    - -

    -DatabaseEntry

    -
    -public DatabaseEntry(byte[] data)
    -
    -
    Construct a DatabaseEntry with a given byte array. The offset is +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DatabaseEntry

        +
        public DatabaseEntry()
        +
        Construct a DatabaseEntry with null data. The offset and size are set to + zero.
        +
      • +
      + + + +
        +
      • +

        DatabaseEntry

        +
        public DatabaseEntry(byte[] data)
        +
        Construct a DatabaseEntry with a given byte array. The offset is set to zero; the size is set to the length of the array, or to zero if null is passed. -

        -

        -

        -
        Parameters:
        data - Byte array wrapped by the DatabaseEntry.
        -
    -
    - -

    -DatabaseEntry

    -
    -public DatabaseEntry(byte[] data,
    -                     int offset,
    -                     int size)
    -
    -
    Constructs a DatabaseEntry with a given byte array, offset and size. -

    -

    -

    -
    Parameters:
    data - Byte array wrapped by the DatabaseEntry.
    offset - Offset in the first byte in the byte array to be included.
    size - Number of bytes in the byte array to be included.
    -
    -
    - -

    -DatabaseEntry

    -
    -public DatabaseEntry(ByteBuffer data)
    -
    -
    Construct a DatabaseEntry with a given native I/O buffer. If the buffer is +

+
Parameters:
data - Byte array wrapped by the DatabaseEntry.
+ + + + + + + + + + + + - - - - - - -
-Method Detail
- -

-getData

-
-public byte[] getData()
-
-
Return the byte array. +
    +
  • + + +

    Method Detail

    + + + +
      +
    • +

      setBlob

      +
      public void setBlob(boolean blob)
      +
      Configure this DatabaseEntry to be stored as a blob. +

      +
      Parameters:
      blob - Whether this DatabaseEntry is configured to be stored as a blob.
      +
    • +
    + + + +
      +
    • +

      getBlob

      +
      public boolean getBlob()
      +
      Return whether this DatabaseEntry is configured to be stored as a blob. +

      +
      Returns:
      Whether this DatabaseEntry is configured to be stored as a blob.
      +
    • +
    + + + +
      +
    • +

      getData

      +
      public byte[] getData()
      +
      Return the byte array.

      For a DatabaseEntry that is used as an output parameter, the byte array will always be a newly allocated array. The byte array specified by the caller will not be used and may be null. -

      -

      -

      - -
      Returns:
      The byte array.
      -
      -
-
- -

-getDataNIO

-
-public ByteBuffer getDataNIO()
-
-
Return the java.nio.ByteBuffer. +

+
Returns:
The byte array.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
- - - - - - - - - - - - - - - - - - -
-Berkeley DB
version 5.3.21
-
- + + +
+ + +
+ + + - -
-Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved. - - +

Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.

+ + -- cgit v1.2.1