DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Berkeley DB
version 4.4.20

com.sleepycat.db
Class MultipleEntry

java.lang.Object
  extended bycom.sleepycat.db.DatabaseEntry
      extended bycom.sleepycat.db.MultipleEntry
Direct Known Subclasses:
MultipleDataEntry, MultipleKeyDataEntry, MultipleRecnoDataEntry

public abstract class MultipleEntry
extends DatabaseEntry

An abstract class representing a DatabaseEntry that holds multiple results returned by a single Cursor get method. Use one of the concrete subclasses depending on whether you need:


Method Summary
 void setUserBuffer(int length, boolean usermem)
          Configures the entry with an application-owned buffer.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setUserBuffer

public void setUserBuffer(int length,
                          boolean usermem)
Description copied from class: DatabaseEntry
Configures the entry with an application-owned buffer.

The data field of the entry must refer to a buffer that is at least length bytes in length.

If the length of the requested item is less than or equal to that number of bytes, the item is copied into the memory to which the data field refers. Otherwise, the size field is set to the length needed for the requested item, and a MemoryException is thrown.

Applications can determine the length of a record by setting length to 0 and calling DatabaseEntry.getSize on the return value.

Overrides:
setUserBuffer in class DatabaseEntry
Parameters:
length - the length of the buffer

usermem - whether the buffer is owned by the application

Berkeley DB
version 4.4.20

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