|
Berkeley DB version 5.3.21 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sleepycat.db.DatabaseEntry com.sleepycat.db.MultipleEntry com.sleepycat.db.MultipleKeyDataEntry
public class MultipleKeyDataEntry
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 |
append(byte[] key,
byte[] data)
Append an entry to the bulk buffer. |
boolean |
append(byte[] key,
int koff,
int klen,
byte[] data,
int doff,
int dlen)
Append an entry to the bulk buffer. |
boolean |
append(DatabaseEntry key,
DatabaseEntry data)
Append an entry to the bulk buffer. |
boolean |
next(DatabaseEntry key,
DatabaseEntry data)
Get the next key/data pair in the returned set. |
Methods inherited from class com.sleepycat.db.MultipleEntry |
---|
append_internal, append_internal, setUserBuffer |
Methods inherited from class com.sleepycat.db.DatabaseEntry |
---|
equals, getData, getDataNIO, getOffset, getPartial, getPartialLength, getPartialOffset, getReadOnly, getRecordNumber, getReuseBuffer, getSize, getUserBuffer, getUserBufferLength, hashCode, setData, setData, setDataNIO, setDataNIO, setOffset, setPartial, setPartial, setPartialLength, setPartialOffset, setReadOnly, setRecordNumber, setReuseBuffer, setSize |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultipleKeyDataEntry()
MultipleEntry.setUserBuffer
method.
public MultipleKeyDataEntry(byte[] data)
MultipleEntry.setUserBuffer
method.
data
- Byte array wrapped by the entry.public MultipleKeyDataEntry(byte[] data, int offset, int size)
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 |
---|
public boolean next(DatabaseEntry key, DatabaseEntry data)
Database
or
Cursor
get method with this object as the data parameter.
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.
false
indicates that the end of the set was reached.public boolean append(byte[] key, int koff, int klen, byte[] data, int doff, int dlen) throws DatabaseException
key
- an array containing the key to be added.koff
- the position in the key array where the record starts.klen
- the length of the record, in bytes, to be copied from the key array.data
- an array containing the value to be added.doff
- the position in the data array where the record starts.dlen
- the length of the record, in bytes, to be copied from the data array.
false
indicates that the specified entry could not fit in the buffer.
DatabaseException
public boolean append(DatabaseEntry key, DatabaseEntry data) throws DatabaseException
key
- the key to be appended, using the offset and size specified in the
DatabaseEntry
.data
- the value to be appended, using the offset and size specified in the
DatabaseEntry
.
false
indicates that the specified entry could not fit in the buffer.
DatabaseException
public boolean append(byte[] key, byte[] data) throws DatabaseException
key
- an array containing the key to be added.data
- an array containing the value to be added.
false
indicates that the specified entry could not fit in the buffer.
DatabaseException
|
Berkeley DB version 5.3.21 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |