• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/docs/java/com/sleepycat/db/
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.5.0) on Thu May 15 17:17:31 EDT 2008 -->
6<TITLE>
7DatabaseEntry (Oracle - Berkeley DB Java API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="com.sleepycat.db.DatabaseEntry class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    parent.document.title="DatabaseEntry (Oracle - Berkeley DB Java API)";
18}
19</SCRIPT>
20<NOSCRIPT>
21</NOSCRIPT>
22
23</HEAD>
24
25<BODY BGCOLOR="white" onload="windowTitle();">
26
27
28<!-- ========= START OF TOP NAVBAR ======= -->
29<A NAME="navbar_top"><!-- --></A>
30<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32<TR>
33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34<A NAME="navbar_top_firstrow"><!-- --></A>
35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36  <TR ALIGN="center" VALIGN="top">
37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DatabaseEntry.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
45  </TR>
46</TABLE>
47</TD>
48<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
49<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
50</TD>
51</TR>
52
53<TR>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A>&nbsp;
56&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58  <A HREF="../../../index.html?com/sleepycat/db/DatabaseEntry.html" target="_top"><B>FRAMES</B></A>  &nbsp;
59&nbsp;<A HREF="DatabaseEntry.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
60&nbsp;<SCRIPT type="text/javascript">
61  <!--
62  if(window==top) {
63    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
64  }
65  //-->
66</SCRIPT>
67<NOSCRIPT>
68  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
69</NOSCRIPT>
70
71
72</FONT></TD>
73</TR>
74<TR>
75<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
76  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
79</TR>
80</TABLE>
81<A NAME="skip-navbar_top"></A>
82<!-- ========= END OF TOP NAVBAR ========= -->
83
84<HR>
85<!-- ======== START OF CLASS DATA ======== -->
86<H2>
87<FONT SIZE="-1">
88com.sleepycat.db</FONT>
89<BR>
90Class DatabaseEntry</H2>
91<PRE>
92<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
93  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.db.DatabaseEntry</B>
94</PRE>
95<DL>
96<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</A></DD>
97</DL>
98<HR>
99<DL>
100<DT><PRE>public class <B>DatabaseEntry</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104Encodes database key and data items as a byte array.
105<p>
106Storage and retrieval for the <A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db"><CODE>Database</CODE></A> and <A HREF="../../../com/sleepycat/db/Cursor.html" title="class in com.sleepycat.db"><CODE>Cursor</CODE></A> methods
107are based on key/data pairs. Both key and data items are represented by
108DatabaseEntry objects.  Key and data byte arrays may refer to arrays of zero
109length up to arrays of essentially unlimited length.
110<p>
111The DatabaseEntry class provides simple access to an underlying object whose
112elements can be examined or changed.  DatabaseEntry objects can be
113subclassed, providing a way to associate with it additional data or
114references to other structures.
115<p>
116Access to DatabaseEntry objects is not re-entrant. In particular, if
117multiple threads simultaneously access the same DatabaseEntry object using
118<A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db"><CODE>Database</CODE></A> or <A HREF="../../../com/sleepycat/db/Cursor.html" title="class in com.sleepycat.db"><CODE>Cursor</CODE></A> methods, the results are undefined.
119<p>
120DatabaseEntry objects may be used in conjunction with the object mapping
121support provided in the <A HREF="../../../com/sleepycat/bind/package-summary.html"><CODE>com.sleepycat.bind</CODE></A> package.
122<p>
123<h3>Input and Output Parameters</h3>
124<p>
125DatabaseEntry objects are used for both input data (when writing to a
126database or specifying a search parameter) and output data (when reading
127from a database).  For certain methods, one parameter may be an input
128parameter and another may be an output parameter.  For example, the
129<A HREF="../../../com/sleepycat/db/Database.html#get(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><CODE>Database.get(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)</CODE></A> method has an input key parameter and an output
130data parameter.  The documentation for each method describes whether its
131parameters are input or output parameters.
132<p>
133For DatabaseEntry input parameters, the caller is responsible for
134initializing the data array of the DatabaseEntry.  For DatabaseEntry
135output parameters, the method called will initialize the data array.
136<p>
137For DatabaseEntry output parameters, by default the method called will
138reuse the byte array in the DatabaseEntry, if the data returned fits in
139the byte array.  This behavior can be configured with <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setReuseBuffer(boolean)"><CODE>setReuseBuffer(boolean)</CODE></A> or <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setUserBuffer(int, boolean)"><CODE>setUserBuffer(int, boolean)</CODE></A>. If an entry is configured to
140reuse the byte array (the default behavior), the length of the underlying
141byte array should not be used to determine the amount of data returned each
142time the entry is used as an output parameter, rather the <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getSize()"><CODE>getSize()</CODE></A>
143call should be used. If an entry is configured to not reuse the byte array,
144a new array is allocated each time the entry is used as an output parameter,
145 so
146the application can safely keep a reference to the byte array returned
147by <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getData()"><CODE>getData()</CODE></A> without danger that the array will be overwritten in
148a subsequent call.
149<p>
150<h3>Offset and Size Properties</h3>
151<p>
152By default the Offset property is zero and the Size property is the length
153of the byte array.  However, to allow for optimizations involving the
154partial use of a byte array, the Offset and Size may be set to non-default
155values.
156<p>
157For DatabaseEntry output parameters, the Size will always be set to the
158length of the returned data and
159the Offset will always be set to zero.
160<p>
161However, for DatabaseEntry input parameters the Offset and Size are set to
162non-default values by the built-in tuple and serial bindings.  For example,
163with a tuple or serial binding the byte array is grown dynamically as data
164is output, and the Size is set to the number of bytes actually used.  For a
165serial binding, the Offset is set to a non-zero value in order to implement
166an optimization having to do with the serialization stream header.
167<p>
168Therefore, for output DatabaseEntry parameters the application can assume
169that the Offset is zero and the Size is the length of the byte array.
170However, for input DatabaseEntry parameters the application should not make
171this assumption.  In general, it is safest for the application to always
172honor the Size and Offset properties, rather than assuming they have default
173values.
174<p>
175<h3>Partial Offset and Length Properties</h3>
176<p>
177By default the specified data (byte array, offset and size) corresponds to
178the full stored key or data item.  Optionally, the Partial property can be
179set to true, and the PartialOffset and PartialLength properties are used to
180specify the portion of the key or data item to be read or written.  For
181details, see the <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)"><CODE>setPartial(int,int,boolean)</CODE></A> method.
182<p>
183Note that the Partial properties are set only by the caller.  They will
184never be set by a Database or Cursor method, nor will they every be set by
185bindings.  Therefore, the application can assume that the Partial properties
186are not set, unless the application itself sets them explicitly.
187<P>
188
189<P>
190<HR>
191
192<P>
193
194<!-- ======== CONSTRUCTOR SUMMARY ======== -->
195
196<A NAME="constructor_summary"><!-- --></A>
197<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
198<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
199<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
200<B>Constructor Summary</B></FONT></TH>
201</TR>
202<TR BGCOLOR="white" CLASS="TableRowColor">
203<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry()">DatabaseEntry</A></B>()</CODE>
204
205<BR>
206&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a DatabaseEntry with null data.</TD>
207</TR>
208<TR BGCOLOR="white" CLASS="TableRowColor">
209<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(byte[])">DatabaseEntry</A></B>(byte[]&nbsp;data)</CODE>
210
211<BR>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a DatabaseEntry with a given byte array.</TD>
213</TR>
214<TR BGCOLOR="white" CLASS="TableRowColor">
215<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(byte[], int, int)">DatabaseEntry</A></B>(byte[]&nbsp;data,
216              int&nbsp;offset,
217              int&nbsp;size)</CODE>
218
219<BR>
220&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a DatabaseEntry with a given byte array, offset and size.</TD>
221</TR>
222<TR BGCOLOR="white" CLASS="TableRowColor">
223<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(java.nio.ByteBuffer)">DatabaseEntry</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data)</CODE>
224
225<BR>
226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a DatabaseEntry with a given native I/O buffer.</TD>
227</TR>
228</TABLE>
229&nbsp;
230<!-- ========== METHOD SUMMARY =========== -->
231
232<A NAME="method_summary"><!-- --></A>
233<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
234<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
235<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
236<B>Method Summary</B></FONT></TH>
237</TR>
238<TR BGCOLOR="white" CLASS="TableRowColor">
239<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
240<CODE>&nbsp;boolean</CODE></FONT></TD>
241<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;o)</CODE>
242
243<BR>
244&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares the data of two entries for byte-by-byte equality.</TD>
245</TR>
246<TR BGCOLOR="white" CLASS="TableRowColor">
247<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
248<CODE>&nbsp;byte[]</CODE></FONT></TD>
249<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getData()">getData</A></B>()</CODE>
250
251<BR>
252&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte array.</TD>
253</TR>
254<TR BGCOLOR="white" CLASS="TableRowColor">
255<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
256<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A></CODE></FONT></TD>
257<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getDataNIO()">getDataNIO</A></B>()</CODE>
258
259<BR>
260&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the java.nio.ByteBuffer.</TD>
261</TR>
262<TR BGCOLOR="white" CLASS="TableRowColor">
263<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
264<CODE>&nbsp;int</CODE></FONT></TD>
265<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getOffset()">getOffset</A></B>()</CODE>
266
267<BR>
268&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte offset into the data array.</TD>
269</TR>
270<TR BGCOLOR="white" CLASS="TableRowColor">
271<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
272<CODE>&nbsp;boolean</CODE></FONT></TD>
273<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getPartial()">getPartial</A></B>()</CODE>
274
275<BR>
276&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return whether this DatabaseEntry is configured to read or write partial
277    records.</TD>
278</TR>
279<TR BGCOLOR="white" CLASS="TableRowColor">
280<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
281<CODE>&nbsp;int</CODE></FONT></TD>
282<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getPartialLength()">getPartialLength</A></B>()</CODE>
283
284<BR>
285&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte length of the partial record being read or written by
286    the application, in bytes.</TD>
287</TR>
288<TR BGCOLOR="white" CLASS="TableRowColor">
289<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290<CODE>&nbsp;int</CODE></FONT></TD>
291<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getPartialOffset()">getPartialOffset</A></B>()</CODE>
292
293<BR>
294&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the offset of the partial record being read or written by the
295    application, in bytes.</TD>
296</TR>
297<TR BGCOLOR="white" CLASS="TableRowColor">
298<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
299<CODE>&nbsp;int</CODE></FONT></TD>
300<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getRecordNumber()">getRecordNumber</A></B>()</CODE>
301
302<BR>
303&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the record number encoded in this entry's buffer.</TD>
304</TR>
305<TR BGCOLOR="white" CLASS="TableRowColor">
306<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
307<CODE>&nbsp;boolean</CODE></FONT></TD>
308<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getReuseBuffer()">getReuseBuffer</A></B>()</CODE>
309
310<BR>
311&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if the whether the entry is configured to reuse the buffer.</TD>
312</TR>
313<TR BGCOLOR="white" CLASS="TableRowColor">
314<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
315<CODE>&nbsp;int</CODE></FONT></TD>
316<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getSize()">getSize</A></B>()</CODE>
317
318<BR>
319&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte size of the data array.</TD>
320</TR>
321<TR BGCOLOR="white" CLASS="TableRowColor">
322<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
323<CODE>&nbsp;boolean</CODE></FONT></TD>
324<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getUserBuffer()">getUserBuffer</A></B>()</CODE>
325
326<BR>
327&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if the whether the buffer in this entry is owned by the
328    application.</TD>
329</TR>
330<TR BGCOLOR="white" CLASS="TableRowColor">
331<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
332<CODE>&nbsp;int</CODE></FONT></TD>
333<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getUserBufferLength()">getUserBufferLength</A></B>()</CODE>
334
335<BR>
336&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the length of the application's buffer.</TD>
337</TR>
338<TR BGCOLOR="white" CLASS="TableRowColor">
339<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
340<CODE>&nbsp;int</CODE></FONT></TD>
341<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#hashCode()">hashCode</A></B>()</CODE>
342
343<BR>
344&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a hash code based on the data value.</TD>
345</TR>
346<TR BGCOLOR="white" CLASS="TableRowColor">
347<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
348<CODE>&nbsp;void</CODE></FONT></TD>
349<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setData(byte[])">setData</A></B>(byte[]&nbsp;data)</CODE>
350
351<BR>
352&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the byte array.</TD>
353</TR>
354<TR BGCOLOR="white" CLASS="TableRowColor">
355<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
356<CODE>&nbsp;void</CODE></FONT></TD>
357<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setData(byte[], int, int)">setData</A></B>(byte[]&nbsp;data,
358        int&nbsp;offset,
359        int&nbsp;size)</CODE>
360
361<BR>
362&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the byte array, offset and size.</TD>
363</TR>
364<TR BGCOLOR="white" CLASS="TableRowColor">
365<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
366<CODE>&nbsp;void</CODE></FONT></TD>
367<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setDataNIO(java.nio.ByteBuffer)">setDataNIO</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data)</CODE>
368
369<BR>
370&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the java.nio.ByteBuffer.</TD>
371</TR>
372<TR BGCOLOR="white" CLASS="TableRowColor">
373<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
374<CODE>&nbsp;void</CODE></FONT></TD>
375<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setDataNIO(java.nio.ByteBuffer, int, int)">setDataNIO</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data,
376           int&nbsp;offset,
377           int&nbsp;size)</CODE>
378
379<BR>
380&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the java.nio.ByteBuffer.</TD>
381</TR>
382<TR BGCOLOR="white" CLASS="TableRowColor">
383<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
384<CODE>&nbsp;void</CODE></FONT></TD>
385<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setOffset(int)">setOffset</A></B>(int&nbsp;offset)</CODE>
386
387<BR>
388&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the byte offset into the data array.</TD>
389</TR>
390<TR BGCOLOR="white" CLASS="TableRowColor">
391<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
392<CODE>&nbsp;void</CODE></FONT></TD>
393<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(boolean)">setPartial</A></B>(boolean&nbsp;partial)</CODE>
394
395<BR>
396&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configure this DatabaseEntry to read or write partial records.</TD>
397</TR>
398<TR BGCOLOR="white" CLASS="TableRowColor">
399<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
400<CODE>&nbsp;void</CODE></FONT></TD>
401<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)">setPartial</A></B>(int&nbsp;doff,
402           int&nbsp;dlen,
403           boolean&nbsp;partial)</CODE>
404
405<BR>
406&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configures this DatabaseEntry to read or write partial records.</TD>
407</TR>
408<TR BGCOLOR="white" CLASS="TableRowColor">
409<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
410<CODE>&nbsp;void</CODE></FONT></TD>
411<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartialLength(int)">setPartialLength</A></B>(int&nbsp;dlen)</CODE>
412
413<BR>
414&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the byte length of the partial record being read or written by
415    the application, in bytes.</TD>
416</TR>
417<TR BGCOLOR="white" CLASS="TableRowColor">
418<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
419<CODE>&nbsp;void</CODE></FONT></TD>
420<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartialOffset(int)">setPartialOffset</A></B>(int&nbsp;doff)</CODE>
421
422<BR>
423&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the offset of the partial record being read or written by the
424    application, in bytes.</TD>
425</TR>
426<TR BGCOLOR="white" CLASS="TableRowColor">
427<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
428<CODE>&nbsp;void</CODE></FONT></TD>
429<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setRecordNumber(int)">setRecordNumber</A></B>(int&nbsp;recno)</CODE>
430
431<BR>
432&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the entry from a logical record number.</TD>
433</TR>
434<TR BGCOLOR="white" CLASS="TableRowColor">
435<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
436<CODE>&nbsp;void</CODE></FONT></TD>
437<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setReuseBuffer(boolean)">setReuseBuffer</A></B>(boolean&nbsp;reuse)</CODE>
438
439<BR>
440&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configures the entry to try to reuse the buffer before allocating a new
441    one.</TD>
442</TR>
443<TR BGCOLOR="white" CLASS="TableRowColor">
444<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
445<CODE>&nbsp;void</CODE></FONT></TD>
446<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setSize(int)">setSize</A></B>(int&nbsp;size)</CODE>
447
448<BR>
449&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the byte size of the data array.</TD>
450</TR>
451<TR BGCOLOR="white" CLASS="TableRowColor">
452<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
453<CODE>&nbsp;void</CODE></FONT></TD>
454<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setUserBuffer(int, boolean)">setUserBuffer</A></B>(int&nbsp;length,
455              boolean&nbsp;usermem)</CODE>
456
457<BR>
458&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configures the entry with an application-owned buffer.</TD>
459</TR>
460</TABLE>
461&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
462<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
463<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
464<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
465</TR>
466<TR BGCOLOR="white" CLASS="TableRowColor">
467<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
468</TR>
469</TABLE>
470&nbsp;
471<P>
472
473<!-- ========= CONSTRUCTOR DETAIL ======== -->
474
475<A NAME="constructor_detail"><!-- --></A>
476<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
477<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
478<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
479<B>Constructor Detail</B></FONT></TH>
480</TR>
481</TABLE>
482
483<A NAME="DatabaseEntry()"><!-- --></A><H3>
484DatabaseEntry</H3>
485<PRE>
486public <B>DatabaseEntry</B>()</PRE>
487<DL>
488<DD>Construct a DatabaseEntry with null data. The offset and size are set to
489    zero.
490<P>
491</DL>
492<HR>
493
494<A NAME="DatabaseEntry(byte[])"><!-- --></A><H3>
495DatabaseEntry</H3>
496<PRE>
497public <B>DatabaseEntry</B>(byte[]&nbsp;data)</PRE>
498<DL>
499<DD>Construct a DatabaseEntry with a given byte array.  The offset is
500    set to zero; the size is set to the length of the array, or to zero if
501    null is passed.
502    <p>
503<P>
504<DL>
505<DT><B>Parameters:</B><DD><CODE>data</CODE> - Byte array wrapped by the DatabaseEntry.</DL>
506</DL>
507<HR>
508
509<A NAME="DatabaseEntry(byte[], int, int)"><!-- --></A><H3>
510DatabaseEntry</H3>
511<PRE>
512public <B>DatabaseEntry</B>(byte[]&nbsp;data,
513                     int&nbsp;offset,
514                     int&nbsp;size)</PRE>
515<DL>
516<DD>Constructs a DatabaseEntry with a given byte array, offset and size.
517    <p>
518<P>
519<DL>
520<DT><B>Parameters:</B><DD><CODE>data</CODE> - Byte array wrapped by the DatabaseEntry.<DD><CODE>offset</CODE> - Offset in the first byte in the byte array to be included.<DD><CODE>size</CODE> - Number of bytes in the byte array to be included.</DL>
521</DL>
522<HR>
523
524<A NAME="DatabaseEntry(java.nio.ByteBuffer)"><!-- --></A><H3>
525DatabaseEntry</H3>
526<PRE>
527public <B>DatabaseEntry</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data)</PRE>
528<DL>
529<DD>Construct a DatabaseEntry with a given native I/O buffer.
530    <p>
531<P>
532<DL>
533<DT><B>Parameters:</B><DD><CODE>data</CODE> - NIO byte buffer wrapped by the DatabaseEntry.</DL>
534</DL>
535
536<!-- ============ METHOD DETAIL ========== -->
537
538<A NAME="method_detail"><!-- --></A>
539<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
540<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
541<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
542<B>Method Detail</B></FONT></TH>
543</TR>
544</TABLE>
545
546<A NAME="getData()"><!-- --></A><H3>
547getData</H3>
548<PRE>
549public byte[] <B>getData</B>()</PRE>
550<DL>
551<DD>Return the byte array.
552    <p>
553    For a DatabaseEntry that is used as an output parameter, the byte
554    array will always be a newly allocated array.  The byte array specified
555    by the caller will not be used and may be null.
556    <p>
557<P>
558<DD><DL>
559
560<DT><B>Returns:</B><DD>The byte array.</DL>
561</DD>
562</DL>
563<HR>
564
565<A NAME="getDataNIO()"><!-- --></A><H3>
566getDataNIO</H3>
567<PRE>
568public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A> <B>getDataNIO</B>()</PRE>
569<DL>
570<DD>Return the java.nio.ByteBuffer.
571    <p>
572    Used to access the underlying data when the DatabaseEntry is
573    configured to utilize a java.nio.ByteBuffer.
574    <p>
575<P>
576<DD><DL>
577
578<DT><B>Returns:</B><DD>The underlying java.nio.ByteBuffer.</DL>
579</DD>
580</DL>
581<HR>
582
583<A NAME="setData(byte[], int, int)"><!-- --></A><H3>
584setData</H3>
585<PRE>
586public void <B>setData</B>(byte[]&nbsp;data,
587                    int&nbsp;offset,
588                    int&nbsp;size)</PRE>
589<DL>
590<DD>Sets the byte array, offset and size.
591    <p>
592<P>
593<DD><DL>
594<DT><B>Parameters:</B><DD><CODE>data</CODE> - Byte array wrapped by the DatabaseEntry.<DD><CODE>offset</CODE> - Offset in the first byte in the byte array to be included.<DD><CODE>size</CODE> - Number of bytes in the byte array to be included.</DL>
595</DD>
596</DL>
597<HR>
598
599<A NAME="setData(byte[])"><!-- --></A><H3>
600setData</H3>
601<PRE>
602public void <B>setData</B>(byte[]&nbsp;data)</PRE>
603<DL>
604<DD>Sets the byte array.  The offset is set to zero; the size is set to the
605    length of the array, or to zero if null is passed.
606    <p>
607<P>
608<DD><DL>
609<DT><B>Parameters:</B><DD><CODE>data</CODE> - Byte array wrapped by the DatabaseEntry.</DL>
610</DD>
611</DL>
612<HR>
613
614<A NAME="setDataNIO(java.nio.ByteBuffer, int, int)"><!-- --></A><H3>
615setDataNIO</H3>
616<PRE>
617public void <B>setDataNIO</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data,
618                       int&nbsp;offset,
619                       int&nbsp;size)</PRE>
620<DL>
621<DD>Sets the java.nio.ByteBuffer.  The offset is set to zero; the size
622    is set to the length of the ByteBuffer, or to zero if null is passed.
623    <p>
624<P>
625<DD><DL>
626<DT><B>Parameters:</B><DD><CODE>data</CODE> - java.nio.ByteBuffer wrapped by the DatabaseEntry.<DD><CODE>offset</CODE> - int offset into the ByteBuffer where the DatabaseEntry data begins.<DD><CODE>size</CODE> - int size of the ByteBuffer available.</DL>
627</DD>
628</DL>
629<HR>
630
631<A NAME="setDataNIO(java.nio.ByteBuffer)"><!-- --></A><H3>
632setDataNIO</H3>
633<PRE>
634public void <B>setDataNIO</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data)</PRE>
635<DL>
636<DD>Sets the java.nio.ByteBuffer.  The offset is set to zero; the size
637    is set to the length of the ByteBuffer, or to zero if null is passed.
638    <p>
639<P>
640<DD><DL>
641<DT><B>Parameters:</B><DD><CODE>data</CODE> - java.nio.ByteBuffer wrapped by the DatabaseEntry.</DL>
642</DD>
643</DL>
644<HR>
645
646<A NAME="getOffset()"><!-- --></A><H3>
647getOffset</H3>
648<PRE>
649public int <B>getOffset</B>()</PRE>
650<DL>
651<DD>Return the byte offset into the data array.
652    <p>
653    For a DatabaseEntry that is used as an output parameter, the offset
654    will always be zero.
655    <p>
656<P>
657<DD><DL>
658
659<DT><B>Returns:</B><DD>Offset in the first byte in the byte array to be included.</DL>
660</DD>
661</DL>
662<HR>
663
664<A NAME="setOffset(int)"><!-- --></A><H3>
665setOffset</H3>
666<PRE>
667public void <B>setOffset</B>(int&nbsp;offset)</PRE>
668<DL>
669<DD>Set the byte offset into the data array.
670    <p>
671<P>
672<DD><DL>
673<DT><B>Parameters:</B><DD><CODE>offset</CODE> - Offset in the first byte in the byte array to be included.</DL>
674</DD>
675</DL>
676<HR>
677
678<A NAME="getPartialLength()"><!-- --></A><H3>
679getPartialLength</H3>
680<PRE>
681public int <B>getPartialLength</B>()</PRE>
682<DL>
683<DD>Return the byte length of the partial record being read or written by
684    the application, in bytes.
685    <p>
686    Note that the Partial properties are set only by the caller.  They
687    will never be set by a Database or Cursor method.
688    <p>
689<P>
690<DD><DL>
691
692<DT><B>Returns:</B><DD>The byte length of the partial record being read or written by the
693    application, in bytes.
694    <p><DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)"><CODE>setPartial(int,int,boolean)</CODE></A></DL>
695</DD>
696</DL>
697<HR>
698
699<A NAME="getPartialOffset()"><!-- --></A><H3>
700getPartialOffset</H3>
701<PRE>
702public int <B>getPartialOffset</B>()</PRE>
703<DL>
704<DD>Return the offset of the partial record being read or written by the
705    application, in bytes.
706    <p>
707    Note that the Partial properties are set only by the caller.  They
708    will never be set by a Database or Cursor method.
709    <p>
710<P>
711<DD><DL>
712
713<DT><B>Returns:</B><DD>The offset of the partial record being read or written by the
714    application, in bytes.
715    <p><DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)"><CODE>setPartial(int,int,boolean)</CODE></A></DL>
716</DD>
717</DL>
718<HR>
719
720<A NAME="getPartial()"><!-- --></A><H3>
721getPartial</H3>
722<PRE>
723public boolean <B>getPartial</B>()</PRE>
724<DL>
725<DD>Return whether this DatabaseEntry is configured to read or write partial
726    records.
727    <p>
728    Note that the Partial properties are set only by the caller.  They
729    will never be set by a Database or Cursor method.
730    <p>
731<P>
732<DD><DL>
733
734<DT><B>Returns:</B><DD>Whether this DatabaseEntry is configured to read or write partial
735    records.
736    <p><DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)"><CODE>setPartial(int,int,boolean)</CODE></A></DL>
737</DD>
738</DL>
739<HR>
740
741<A NAME="setPartialOffset(int)"><!-- --></A><H3>
742setPartialOffset</H3>
743<PRE>
744public void <B>setPartialOffset</B>(int&nbsp;doff)</PRE>
745<DL>
746<DD>Set the offset of the partial record being read or written by the
747    application, in bytes.
748    <p>
749    Note that the Partial properties are set only by the caller.  They
750    will never be set by a Database or Cursor method.
751    <p>
752<P>
753<DD><DL>
754<DT><B>Parameters:</B><DD><CODE>doff</CODE> - The offset of the partial record being read or written by the
755    application, in bytes.
756    <p><DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)"><CODE>setPartial(int,int,boolean)</CODE></A></DL>
757</DD>
758</DL>
759<HR>
760
761<A NAME="setPartialLength(int)"><!-- --></A><H3>
762setPartialLength</H3>
763<PRE>
764public void <B>setPartialLength</B>(int&nbsp;dlen)</PRE>
765<DL>
766<DD>Set the byte length of the partial record being read or written by
767    the application, in bytes.
768    <p>
769    Note that the Partial properties are set only by the caller.  They
770    will never be set by a Database or Cursor method.
771    <p>
772<P>
773<DD><DL>
774<DT><B>Parameters:</B><DD><CODE>dlen</CODE> - The byte length of the partial record being read or written by the
775    <p><DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)"><CODE>application, in bytes.</CODE></A></DL>
776</DD>
777</DL>
778<HR>
779
780<A NAME="setPartial(boolean)"><!-- --></A><H3>
781setPartial</H3>
782<PRE>
783public void <B>setPartial</B>(boolean&nbsp;partial)</PRE>
784<DL>
785<DD>Configure this DatabaseEntry to read or write partial records.
786    <p>
787    Note that the Partial properties are set only by the caller.  They
788    will never be set by a Database or Cursor method.
789    <p>
790<P>
791<DD><DL>
792<DT><B>Parameters:</B><DD><CODE>partial</CODE> - Whether this DatabaseEntry is configured to read or write partial
793    records.
794    <p><DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)"><CODE>setPartial(int,int,boolean)</CODE></A></DL>
795</DD>
796</DL>
797<HR>
798
799<A NAME="setPartial(int, int, boolean)"><!-- --></A><H3>
800setPartial</H3>
801<PRE>
802public void <B>setPartial</B>(int&nbsp;doff,
803                       int&nbsp;dlen,
804                       boolean&nbsp;partial)</PRE>
805<DL>
806<DD>Configures this DatabaseEntry to read or write partial records.
807    <p>
808    Do partial retrieval or storage of an item.  If the calling
809    application is doing a retrieval, length bytes specified by
810    <tt>dlen</tt>, starting at the offset set by <tt>doff</tt> bytes from
811    the beginning of the retrieved data record are returned as if they
812    comprised the entire record.  If any or all of the specified bytes do
813    not exist in the record, the get is successful, and any existing bytes
814    are returned.
815    <p>
816    For example, if the data portion of a retrieved record was 100 bytes,
817    and a partial retrieval was done using a DatabaseEntry having a partial
818    length of 20 and a partial offset of 85, the retrieval would succeed and
819    the retrieved data would be the last 15 bytes of the record.
820    <p>
821    If the calling application is storing an item, length bytes specified
822    by <tt>dlen</tt>, starting at the offset set by <tt>doff</tt>
823    bytes from the beginning of the specified key's data item are replaced
824    by the data specified by the DatabaseEntry.  If the partial length is
825    smaller than the data, the record will grow; if the partial length is
826    larger than the data, the record will shrink.  If the specified bytes do
827    not exist, the record will be extended using nul bytes as necessary, and
828    the store will succeed.
829    <p>
830    It is an error to specify a partial key when performing a put
831    operation of any kind.
832    <p>
833    It is an error to attempt a partial store using the <A HREF="../../../com/sleepycat/db/Database.html#put(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)"><CODE>Database.put</CODE></A> method in a database that supports duplicate records. Partial
834    stores in databases supporting duplicate records must be done using a
835    cursor method.
836    <p>
837    Note that the Partial properties are set only by the caller.  They
838    will never be set by a Database or Cursor method.
839    <p>
840<P>
841<DD><DL>
842<DT><B>Parameters:</B><DD><CODE>doff</CODE> - The offset of the partial record being read or written by the
843    application, in bytes.
844    <p><DD><CODE>dlen</CODE> - The byte length of the partial record being read or written by the
845    application, in bytes.
846    <p><DD><CODE>partial</CODE> - Whether this DatabaseEntry is configured to read or write partial
847    records.</DL>
848</DD>
849</DL>
850<HR>
851
852<A NAME="getRecordNumber()"><!-- --></A><H3>
853getRecordNumber</H3>
854<PRE>
855public int <B>getRecordNumber</B>()</PRE>
856<DL>
857<DD>Return the record number encoded in this entry's buffer.
858<p>
859This method may be called at any time during the life of the application.
860<p>
861<P>
862<DD><DL>
863
864<DT><B>Returns:</B><DD>The record number encoded in this entry's buffer.</DL>
865</DD>
866</DL>
867<HR>
868
869<A NAME="setRecordNumber(int)"><!-- --></A><H3>
870setRecordNumber</H3>
871<PRE>
872public void <B>setRecordNumber</B>(int&nbsp;recno)</PRE>
873<DL>
874<DD>Initialize the entry from a logical record number.  Record numbers
875    are integer keys starting at 1.  When this method is called the data,
876    size and offset fields are implicitly set to hold a byte array
877    representation of the integer key.
878<P>
879<DD><DL>
880<DT><B>Parameters:</B><DD><CODE>recno</CODE> - the record number to be encoded</DL>
881</DD>
882</DL>
883<HR>
884
885<A NAME="getReuseBuffer()"><!-- --></A><H3>
886getReuseBuffer</H3>
887<PRE>
888public boolean <B>getReuseBuffer</B>()</PRE>
889<DL>
890<DD>Return true if the whether the entry is configured to reuse the buffer.
891<p>
892This method may be called at any time during the life of the application.
893<p>
894<P>
895<DD><DL>
896
897<DT><B>Returns:</B><DD>True if the whether the entry is configured to reuse the buffer.</DL>
898</DD>
899</DL>
900<HR>
901
902<A NAME="setReuseBuffer(boolean)"><!-- --></A><H3>
903setReuseBuffer</H3>
904<PRE>
905public void <B>setReuseBuffer</B>(boolean&nbsp;reuse)</PRE>
906<DL>
907<DD>Configures the entry to try to reuse the buffer before allocating a new
908    one.
909    <p>
910<P>
911<DD><DL>
912<DT><B>Parameters:</B><DD><CODE>reuse</CODE> - whether to reuse the buffer</DL>
913</DD>
914</DL>
915<HR>
916
917<A NAME="getSize()"><!-- --></A><H3>
918getSize</H3>
919<PRE>
920public int <B>getSize</B>()</PRE>
921<DL>
922<DD>Return the byte size of the data array.
923    <p>
924    For a DatabaseEntry that is used as an output parameter, the size
925    will always be the length of the data array.
926    <p>
927<P>
928<DD><DL>
929
930<DT><B>Returns:</B><DD>Number of bytes in the byte array to be included.</DL>
931</DD>
932</DL>
933<HR>
934
935<A NAME="setSize(int)"><!-- --></A><H3>
936setSize</H3>
937<PRE>
938public void <B>setSize</B>(int&nbsp;size)</PRE>
939<DL>
940<DD>Set the byte size of the data array.
941    <p>
942<P>
943<DD><DL>
944<DT><B>Parameters:</B><DD><CODE>size</CODE> - Number of bytes in the byte array to be included.</DL>
945</DD>
946</DL>
947<HR>
948
949<A NAME="getUserBuffer()"><!-- --></A><H3>
950getUserBuffer</H3>
951<PRE>
952public boolean <B>getUserBuffer</B>()</PRE>
953<DL>
954<DD>Return true if the whether the buffer in this entry is owned by the
955    application.
956<p>
957This method may be called at any time during the life of the application.
958<p>
959<P>
960<DD><DL>
961
962<DT><B>Returns:</B><DD>True if the whether the buffer in this entry is owned by the
963    application.</DL>
964</DD>
965</DL>
966<HR>
967
968<A NAME="getUserBufferLength()"><!-- --></A><H3>
969getUserBufferLength</H3>
970<PRE>
971public int <B>getUserBufferLength</B>()</PRE>
972<DL>
973<DD>Return the length of the application's buffer.
974<p>
975This method may be called at any time during the life of the application.
976<p>
977<P>
978<DD><DL>
979
980<DT><B>Returns:</B><DD>The length of the application's buffer.</DL>
981</DD>
982</DL>
983<HR>
984
985<A NAME="setUserBuffer(int, boolean)"><!-- --></A><H3>
986setUserBuffer</H3>
987<PRE>
988public void <B>setUserBuffer</B>(int&nbsp;length,
989                          boolean&nbsp;usermem)</PRE>
990<DL>
991<DD>Configures the entry with an application-owned buffer.
992    <p>
993    The <code>data</code> field of the entry must refer to a buffer that is
994    at least <code>length</code> bytes in length.
995    <p>
996    If the length of the requested item is less than or equal to that number
997    of bytes, the item is copied into the memory to which the
998    <code>data</code> field refers.  Otherwise, the <code>size</code> field
999    is set to the length needed for the requested item, and a
1000    <A HREF="../../../com/sleepycat/db/MemoryException.html" title="class in com.sleepycat.db"><CODE>MemoryException</CODE></A> is thrown.
1001    <p>
1002    Applications can determine the length of a record by setting
1003    <code>length</code> to 0 and calling <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getSize()"><CODE>DatabaseEntry.getSize</CODE></A>
1004    on the return value.
1005    <p>
1006<P>
1007<DD><DL>
1008<DT><B>Parameters:</B><DD><CODE>length</CODE> - the length of the buffer
1009    <p><DD><CODE>usermem</CODE> - whether the buffer is owned by the application</DL>
1010</DD>
1011</DL>
1012<HR>
1013
1014<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
1015equals</H3>
1016<PRE>
1017public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;o)</PRE>
1018<DL>
1019<DD>Compares the data of two entries for byte-by-byte equality.
1020
1021 <p>In either entry, if the offset is non-zero or the size is not equal
1022 to the data array length, then only the data bounded by these values is
1023 compared.  The data array length and offset need not be the same in both
1024 entries for them to be considered equal.</p>
1025
1026 <p>If the data array is null in one entry, then to be considered equal
1027 both entries must have a null data array.</p>
1028
1029 <p>If the partial property is set in either entry, then to be considered
1030 equal both entries must have the same partial properties: partial,
1031 partialOffset and partialLength.
1032<P>
1033<DD><DL>
1034<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></DL>
1035</DD>
1036<DD><DL>
1037</DL>
1038</DD>
1039</DL>
1040<HR>
1041
1042<A NAME="hashCode()"><!-- --></A><H3>
1043hashCode</H3>
1044<PRE>
1045public int <B>hashCode</B>()</PRE>
1046<DL>
1047<DD>Returns a hash code based on the data value.
1048<P>
1049<DD><DL>
1050<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></DL>
1051</DD>
1052<DD><DL>
1053</DL>
1054</DD>
1055</DL>
1056<!-- ========= END OF CLASS DATA ========= -->
1057<HR>
1058
1059
1060<!-- ======= START OF BOTTOM NAVBAR ====== -->
1061<A NAME="navbar_bottom"><!-- --></A>
1062<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1063<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1064<TR>
1065<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1066<A NAME="navbar_bottom_firstrow"><!-- --></A>
1067<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1068  <TR ALIGN="center" VALIGN="top">
1069  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1070  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1071  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1072  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DatabaseEntry.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
1073  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1074  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1075  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1076  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1077  </TR>
1078</TABLE>
1079</TD>
1080<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1081<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
1082</TD>
1083</TR>
1084
1085<TR>
1086<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1087&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A>&nbsp;
1088&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD>
1089<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1090  <A HREF="../../../index.html?com/sleepycat/db/DatabaseEntry.html" target="_top"><B>FRAMES</B></A>  &nbsp;
1091&nbsp;<A HREF="DatabaseEntry.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
1092&nbsp;<SCRIPT type="text/javascript">
1093  <!--
1094  if(window==top) {
1095    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
1096  }
1097  //-->
1098</SCRIPT>
1099<NOSCRIPT>
1100  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
1101</NOSCRIPT>
1102
1103
1104</FONT></TD>
1105</TR>
1106<TR>
1107<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1108  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1109<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1110DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1111</TR>
1112</TABLE>
1113<A NAME="skip-navbar_bottom"></A>
1114<!-- ======== END OF BOTTOM NAVBAR ======= -->
1115
1116<HR>
1117<font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
1118</BODY>
1119</HTML>
1120