Berkeley DB
version 4.3.29

com.sleepycat.db
Class MultipleKeyDataEntry

java.lang.Object
  extended bycom.sleepycat.db.DatabaseEntry
      extended bycom.sleepycat.db.MultipleEntry
          extended bycom.sleepycat.db.MultipleKeyDataEntry

public class MultipleKeyDataEntry
extends MultipleEntry

A DatabaseEntry that holds multiple key/data pairs returned by a single Database or Cursor get call.


Constructor Summary
MultipleKeyDataEntry()
          Construct an entry with no data.
MultipleKeyDataEntry(byte[] data)
          Construct an entry with a given byte array.
MultipleKeyDataEntry(byte[] data, int offset, int size)
          Constructs a DatabaseEntry with a given byte array, offset and size.
 
Method Summary
 boolean next(DatabaseEntry key, DatabaseEntry data)
          Get the next key/data pair in the returned set.
 
Methods inherited from class com.sleepycat.db.MultipleEntry
setUserBuffer
 
Methods inherited from class com.sleepycat.db.DatabaseEntry
getData, getOffset, getPartial, getPartialLength, getPartialOffset, getRecordNumber, getReuseBuffer, getSize, getUserBuffer, getUserBufferLength, setData, setData, setOffset, setPartial, setPartial, setPartialLength, setPartialOffset, setRecordNumber, setReuseBuffer, setSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleKeyDataEntry

public MultipleKeyDataEntry()
Construct an entry with no data. The object must be configured before use with the MultipleEntry.setUserBuffer method.


MultipleKeyDataEntry

public MultipleKeyDataEntry(byte[] data)
Construct an entry with a given byte array. The offset is set to zero; the size is set to the length of the array. If null is passed, the object must be configured before use with the MultipleEntry.setUserBuffer method.

Parameters:
data - Byte array wrapped by the entry.

MultipleKeyDataEntry

public MultipleKeyDataEntry(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.
Method Detail

next

public boolean next(DatabaseEntry key,
                    DatabaseEntry data)
Get the next key/data pair in the returned set. This method may only be called after a successful call to a Database or Cursor get method with this object as the data parameter.

Parameters:
key - an entry that is set to refer to the next key element in the returned set.

data - an entry that is set to refer to the next data element in the returned set.

Returns:
indicates whether a value was found. A return of false indicates that the end of the set was reached.

Berkeley DB
version 4.3.29

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.