File: DatabaseEntry.html

package info (click to toggle)
db5.3 5.3.28%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 158,500 kB
  • sloc: ansic: 448,411; java: 111,824; tcl: 80,544; sh: 44,264; cs: 33,697; cpp: 21,604; perl: 14,557; xml: 10,799; makefile: 4,077; javascript: 1,998; yacc: 1,003; awk: 965; sql: 801; erlang: 342; python: 216; php: 24; asm: 14
file content (1182 lines) | stat: -rw-r--r-- 50,388 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_51) on Mon Sep 09 11:47:04 EDT 2013 -->
<TITLE>
DatabaseEntry (Oracle - Berkeley DB Java API)
</TITLE>

<META NAME="date" CONTENT="2013-09-09">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="DatabaseEntry (Oracle - Berkeley DB Java API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DatabaseEntry.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Berkeley DB</b><br><font size="-1"> version 5.3.28</font></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?com/sleepycat/db/DatabaseEntry.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="DatabaseEntry.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sleepycat.db</FONT>
<BR>
Class DatabaseEntry</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.db.DatabaseEntry</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>DatabaseEntry</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
Encodes database key and data items as a byte array.
<p>
Storage 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
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.
<p>
The DatabaseEntry class provides simple access to an underlying object whose
elements can be examined or changed.  DatabaseEntry objects can be
subclassed, providing a way to associate with it additional data or
references to other structures.
<p>
Access to DatabaseEntry objects is not re-entrant. In particular, if
multiple threads simultaneously access the same DatabaseEntry object using
<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.
<p>
DatabaseEntry objects may be used in conjunction with the object mapping
support provided in the <A HREF="../../../com/sleepycat/bind/package-summary.html"><CODE>com.sleepycat.bind</CODE></A> package.
<p>
<h3>Input and Output Parameters</h3>
<p>
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
<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
data parameter.  The documentation for each method describes whether its
parameters are input or output parameters.
<p>
For DatabaseEntry input parameters, the caller is responsible for
initializing the data array of the DatabaseEntry.  For DatabaseEntry
output parameters, the method called will initialize the data array.
<p>
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 <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
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 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getSize()"><CODE>getSize()</CODE></A>
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 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getData()"><CODE>getData()</CODE></A> without danger that the array will be overwritten in
a subsequent call.
<p>
<h3>Offset and Size Properties</h3>
<p>
By default the Offset property is zero and the Size property is the length
of the byte array.  However, to allow for optimizations involving the
partial use of a byte array, the Offset and Size may be set to non-default
values.
<p>
For DatabaseEntry output parameters, the Size will always be set to the
length of the returned data and
the Offset will always be set to zero.
<p>
However, for DatabaseEntry input parameters the Offset and Size are set to
non-default values by the built-in tuple and serial bindings.  For example,
with a tuple or serial binding the byte array is grown dynamically as data
is output, and the Size is set to the number of bytes actually used.  For a
serial binding, the Offset is set to a non-zero value in order to implement
an optimization having to do with the serialization stream header.
<p>
Therefore, for output DatabaseEntry parameters the application can assume
that the Offset is zero and the Size is the length of the byte array.
However, for input DatabaseEntry parameters the application should not make
this assumption.  In general, it is safest for the application to always
honor the Size and Offset properties, rather than assuming they have default
values.
<p>
<h3>Partial Offset and Length Properties</h3>
<p>
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 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)"><CODE>setPartial(int,int,boolean)</CODE></A> method.
<p>
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.
<P>

<P>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry()">DatabaseEntry</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a DatabaseEntry with null data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(byte[])">DatabaseEntry</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a DatabaseEntry with a given byte array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(byte[], int, int)">DatabaseEntry</A></B>(byte[]&nbsp;data,
              int&nbsp;offset,
              int&nbsp;size)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a DatabaseEntry with a given byte array, offset and size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(java.nio.ByteBuffer)">DatabaseEntry</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a DatabaseEntry with a given native I/O buffer.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;o)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares the data of two entries for byte-by-byte equality.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getData()">getData</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getDataNIO()">getDataNIO</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the java.nio.ByteBuffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getOffset()">getOffset</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte offset into the data array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getPartial()">getPartial</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return whether this DatabaseEntry is configured to read or write partial
    records.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getPartialLength()">getPartialLength</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte length of the partial record being read or written by
    the application, in bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getPartialOffset()">getPartialOffset</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the offset of the partial record being read or written by the
    application, in bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getReadOnly()">getReadOnly</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return whether this DatabaseEntry is configured as read only.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getRecordNumber()">getRecordNumber</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the record number encoded in this entry's buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getReuseBuffer()">getReuseBuffer</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if the whether the entry is configured to reuse the buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getSize()">getSize</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte size of the data array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getUserBuffer()">getUserBuffer</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if the whether the buffer in this entry is owned by the
    application.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getUserBufferLength()">getUserBufferLength</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the length of the application's buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#hashCode()">hashCode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a hash code based on the data value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setData(byte[])">setData</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the byte array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setData(byte[], int, int)">setData</A></B>(byte[]&nbsp;data,
        int&nbsp;offset,
        int&nbsp;size)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the byte array, offset and size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setDataNIO(java.nio.ByteBuffer)">setDataNIO</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the java.nio.ByteBuffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setDataNIO(java.nio.ByteBuffer, int, int)">setDataNIO</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data,
           int&nbsp;offset,
           int&nbsp;size)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the java.nio.ByteBuffer (or the backing array if passed a non-direct
    ByteBuffer,) offset and size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setOffset(int)">setOffset</A></B>(int&nbsp;offset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the byte offset into the data array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(boolean)">setPartial</A></B>(boolean&nbsp;partial)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configure this DatabaseEntry to read or write partial records.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int, int, boolean)">setPartial</A></B>(int&nbsp;doff,
           int&nbsp;dlen,
           boolean&nbsp;partial)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configures this DatabaseEntry to read or write partial records.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartialLength(int)">setPartialLength</A></B>(int&nbsp;dlen)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the byte length of the partial record being read or written by
    the application, in bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setPartialOffset(int)">setPartialOffset</A></B>(int&nbsp;doff)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the offset of the partial record being read or written by the
    application, in bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setReadOnly(boolean)">setReadOnly</A></B>(boolean&nbsp;readonly)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configure this DatabaseEntry as read only.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setRecordNumber(int)">setRecordNumber</A></B>(int&nbsp;recno)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the entry from a logical record number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setReuseBuffer(boolean)">setReuseBuffer</A></B>(boolean&nbsp;reuse)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configures the entry to try to reuse the buffer before allocating a new
    one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setSize(int)">setSize</A></B>(int&nbsp;size)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the byte size of the data array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setUserBuffer(int, boolean)">setUserBuffer</A></B>(int&nbsp;length,
              boolean&nbsp;usermem)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configures the entry with an application-owned buffer.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="DatabaseEntry()"><!-- --></A><H3>
DatabaseEntry</H3>
<PRE>
public <B>DatabaseEntry</B>()</PRE>
<DL>
<DD>Construct a DatabaseEntry with null data. The offset and size are set to
    zero.
<P>
</DL>
<HR>

<A NAME="DatabaseEntry(byte[])"><!-- --></A><H3>
DatabaseEntry</H3>
<PRE>
public <B>DatabaseEntry</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>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.
    <p>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - Byte array wrapped by the DatabaseEntry.</DL>
</DL>
<HR>

<A NAME="DatabaseEntry(byte[], int, int)"><!-- --></A><H3>
DatabaseEntry</H3>
<PRE>
public <B>DatabaseEntry</B>(byte[]&nbsp;data,
                     int&nbsp;offset,
                     int&nbsp;size)</PRE>
<DL>
<DD>Constructs a DatabaseEntry with a given byte array, offset and size.
    <p>
<P>
<DL>
<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>
</DL>
<HR>

<A NAME="DatabaseEntry(java.nio.ByteBuffer)"><!-- --></A><H3>
DatabaseEntry</H3>
<PRE>
public <B>DatabaseEntry</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data)</PRE>
<DL>
<DD>Construct a DatabaseEntry with a given native I/O buffer.  If the buffer is
    non-direct, the buffer's backing array is used.  If the buffer is direct,
    the DatabaseEntry is configured with an application-owned buffer whose
    length is set to the ByteBuffer's capacity less its position.  The
    DatabaseEntry's size is set to the ByteBuffer's limit less its position and
    the offset is set to buffer's position (adjusted by arrayOffset if the
    buffer is non-direct.)
    <p>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - NIO byte buffer wrapped by the DatabaseEntry.</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getData()"><!-- --></A><H3>
getData</H3>
<PRE>
public byte[] <B>getData</B>()</PRE>
<DL>
<DD>Return the byte array.
    <p>
    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.
    <p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The byte array.</DL>
</DD>
</DL>
<HR>

<A NAME="getDataNIO()"><!-- --></A><H3>
getDataNIO</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A> <B>getDataNIO</B>()</PRE>
<DL>
<DD>Return the java.nio.ByteBuffer.
    <p>
    Used to access the underlying data when the DatabaseEntry is
    configured to utilize a java.nio.ByteBuffer.
    <p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The underlying java.nio.ByteBuffer.</DL>
</DD>
</DL>
<HR>

<A NAME="setData(byte[], int, int)"><!-- --></A><H3>
setData</H3>
<PRE>
public void <B>setData</B>(byte[]&nbsp;data,
                    int&nbsp;offset,
                    int&nbsp;size)</PRE>
<DL>
<DD>Sets the byte array, offset and size.
    <p>
<P>
<DD><DL>
<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>
</DD>
</DL>
<HR>

<A NAME="setData(byte[])"><!-- --></A><H3>
setData</H3>
<PRE>
public void <B>setData</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>Sets the 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.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - Byte array wrapped by the DatabaseEntry.</DL>
</DD>
</DL>
<HR>

<A NAME="setDataNIO(java.nio.ByteBuffer, int, int)"><!-- --></A><H3>
setDataNIO</H3>
<PRE>
public void <B>setDataNIO</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data,
                       int&nbsp;offset,
                       int&nbsp;size)</PRE>
<DL>
<DD>Sets the java.nio.ByteBuffer (or the backing array if passed a non-direct
    ByteBuffer,) offset and size.  If passed a direct ByteBuffer, the entry is
    configured with an application-owned buffer whose length is set to the 
    ByteBuffer's capacity less the offset.
    <p>
<P>
<DD><DL>
<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>
</DD>
</DL>
<HR>

<A NAME="setDataNIO(java.nio.ByteBuffer)"><!-- --></A><H3>
setDataNIO</H3>
<PRE>
public void <B>setDataNIO</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A>&nbsp;data)</PRE>
<DL>
<DD>Sets the java.nio.ByteBuffer.  The offset is set to the ByteBuffer's
    position; the size is set to the ByteBuffer's limit less its position, or to
    zero if null is passed.  If the ByteBuffer is non-direct, the backing array
    will be used.  If passed a direct ByteBuffer, the entry is configured with
    an application-owned buffer whose length is set to the ByteBuffer's capacity
    less its current position.  No call to <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setUserBuffer(int, boolean)"><CODE>setUserBuffer(int, boolean)</CODE></A> is required
    after setting the ByteBuffer.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - java.nio.ByteBuffer wrapped by the DatabaseEntry.</DL>
</DD>
</DL>
<HR>

<A NAME="getOffset()"><!-- --></A><H3>
getOffset</H3>
<PRE>
public int <B>getOffset</B>()</PRE>
<DL>
<DD>Return the byte offset into the data array.
    <p>
    For a DatabaseEntry that is used as an output parameter, the offset
    will always be zero.
    <p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>Offset in the first byte in the byte array to be included.</DL>
</DD>
</DL>
<HR>

<A NAME="setOffset(int)"><!-- --></A><H3>
setOffset</H3>
<PRE>
public void <B>setOffset</B>(int&nbsp;offset)</PRE>
<DL>
<DD>Set the byte offset into the data array.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - Offset in the first byte in the byte array to be included.</DL>
</DD>
</DL>
<HR>

<A NAME="getPartialLength()"><!-- --></A><H3>
getPartialLength</H3>
<PRE>
public int <B>getPartialLength</B>()</PRE>
<DL>
<DD>Return the byte length of the partial record being read or written by
    the application, in bytes.
    <p>
    Note that the Partial properties are set only by the caller.  They
    will never be set by a Database or Cursor method.
    <p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The byte length of the partial record being read or written by the
    application, in bytes.
    <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>
</DD>
</DL>
<HR>

<A NAME="getPartialOffset()"><!-- --></A><H3>
getPartialOffset</H3>
<PRE>
public int <B>getPartialOffset</B>()</PRE>
<DL>
<DD>Return the offset of the partial record being read or written by the
    application, in bytes.
    <p>
    Note that the Partial properties are set only by the caller.  They
    will never be set by a Database or Cursor method.
    <p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The offset of the partial record being read or written by the
    application, in bytes.
    <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>
</DD>
</DL>
<HR>

<A NAME="getPartial()"><!-- --></A><H3>
getPartial</H3>
<PRE>
public boolean <B>getPartial</B>()</PRE>
<DL>
<DD>Return whether this DatabaseEntry is configured to read or write partial
    records.
    <p>
    Note that the Partial properties are set only by the caller.  They
    will never be set by a Database or Cursor method.
    <p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>Whether this DatabaseEntry is configured to read or write partial
    records.
    <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>
</DD>
</DL>
<HR>

<A NAME="setPartialOffset(int)"><!-- --></A><H3>
setPartialOffset</H3>
<PRE>
public void <B>setPartialOffset</B>(int&nbsp;doff)</PRE>
<DL>
<DD>Set the offset of the partial record being read or written by the
    application, in bytes.
    <p>
    Note that the Partial properties are set only by the caller.  They
    will never be set by a Database or Cursor method.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>doff</CODE> - The offset of the partial record being read or written by the
    application, in bytes.
    <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>
</DD>
</DL>
<HR>

<A NAME="setPartialLength(int)"><!-- --></A><H3>
setPartialLength</H3>
<PRE>
public void <B>setPartialLength</B>(int&nbsp;dlen)</PRE>
<DL>
<DD>Set the byte length of the partial record being read or written by
    the application, in bytes.
    <p>
    Note that the Partial properties are set only by the caller.  They
    will never be set by a Database or Cursor method.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dlen</CODE> - The byte length of the partial record being read or written by the
    <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>
</DD>
</DL>
<HR>

<A NAME="setPartial(boolean)"><!-- --></A><H3>
setPartial</H3>
<PRE>
public void <B>setPartial</B>(boolean&nbsp;partial)</PRE>
<DL>
<DD>Configure this DatabaseEntry to read or write partial records.
    <p>
    Note that the Partial properties are set only by the caller.  They
    will never be set by a Database or Cursor method.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>partial</CODE> - Whether this DatabaseEntry is configured to read or write partial
    records.
    <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>
</DD>
</DL>
<HR>

<A NAME="setPartial(int, int, boolean)"><!-- --></A><H3>
setPartial</H3>
<PRE>
public void <B>setPartial</B>(int&nbsp;doff,
                       int&nbsp;dlen,
                       boolean&nbsp;partial)</PRE>
<DL>
<DD>Configures this DatabaseEntry to read or write partial records.
    <p>
    Do partial retrieval or storage of an item.  If the calling
    application is doing a retrieval, length bytes specified by
    <tt>dlen</tt>, starting at the offset set by <tt>doff</tt> bytes from
    the beginning of the retrieved data record are returned as if they
    comprised the entire record.  If any or all of the specified bytes do
    not exist in the record, the get is successful, and any existing bytes
    are returned.
    <p>
    For example, if the data portion of a retrieved record was 100 bytes,
    and a partial retrieval was done using a DatabaseEntry having a partial
    length of 20 and a partial offset of 85, the retrieval would succeed and
    the retrieved data would be the last 15 bytes of the record.
    <p>
    If the calling application is storing an item, length bytes specified
    by <tt>dlen</tt>, starting at the offset set by <tt>doff</tt>
    bytes from the beginning of the specified key's data item are replaced
    by the data specified by the DatabaseEntry.  If the partial length is
    smaller than the data, the record will grow; if the partial length is
    larger than the data, the record will shrink.  If the specified bytes do
    not exist, the record will be extended using nul bytes as necessary, and
    the store will succeed.
    <p>
    It is an error to specify a partial key when performing a put
    operation of any kind.
    <p>
    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
    stores in databases supporting duplicate records must be done using a
    cursor method.
    <p>
    Note that the Partial properties are set only by the caller.  They
    will never be set by a Database or Cursor method.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>doff</CODE> - The offset of the partial record being read or written by the
    application, in bytes.
    <p><DD><CODE>dlen</CODE> - The byte length of the partial record being read or written by the
    application, in bytes.
    <p><DD><CODE>partial</CODE> - Whether this DatabaseEntry is configured to read or write partial
    records.</DL>
</DD>
</DL>
<HR>

<A NAME="getReadOnly()"><!-- --></A><H3>
getReadOnly</H3>
<PRE>
public boolean <B>getReadOnly</B>()</PRE>
<DL>
<DD>Return whether this DatabaseEntry is configured as read only.
    <p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>Whether this DatabaseEntry is configured as read only.
    <p><DT><B>See Also:</B><DD><A HREF="../../../com/sleepycat/db/DatabaseEntry.html#setReadOnly(boolean)"><CODE>setReadOnly(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setReadOnly(boolean)"><!-- --></A><H3>
setReadOnly</H3>
<PRE>
public void <B>setReadOnly</B>(boolean&nbsp;readonly)</PRE>
<DL>
<DD>Configure this DatabaseEntry as read only.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>readonly</CODE> - Whether this DatabaseEntry is configured as read only.</DL>
</DD>
</DL>
<HR>

<A NAME="getRecordNumber()"><!-- --></A><H3>
getRecordNumber</H3>
<PRE>
public int <B>getRecordNumber</B>()</PRE>
<DL>
<DD>Return the record number encoded in this entry's buffer.
<p>
This method may be called at any time during the life of the application.
<p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The record number encoded in this entry's buffer.</DL>
</DD>
</DL>
<HR>

<A NAME="setRecordNumber(int)"><!-- --></A><H3>
setRecordNumber</H3>
<PRE>
public void <B>setRecordNumber</B>(int&nbsp;recno)</PRE>
<DL>
<DD>Initialize the entry from a logical record number.  Record numbers
    are integer keys starting at 1.  When this method is called the data,
    size and offset fields are implicitly set to hold a byte array
    representation of the integer key.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>recno</CODE> - the record number to be encoded</DL>
</DD>
</DL>
<HR>

<A NAME="getReuseBuffer()"><!-- --></A><H3>
getReuseBuffer</H3>
<PRE>
public boolean <B>getReuseBuffer</B>()</PRE>
<DL>
<DD>Return true if the whether the entry is configured to reuse the buffer.
<p>
This method may be called at any time during the life of the application.
<p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>True if the whether the entry is configured to reuse the buffer.</DL>
</DD>
</DL>
<HR>

<A NAME="setReuseBuffer(boolean)"><!-- --></A><H3>
setReuseBuffer</H3>
<PRE>
public void <B>setReuseBuffer</B>(boolean&nbsp;reuse)</PRE>
<DL>
<DD>Configures the entry to try to reuse the buffer before allocating a new
    one.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reuse</CODE> - whether to reuse the buffer</DL>
</DD>
</DL>
<HR>

<A NAME="getSize()"><!-- --></A><H3>
getSize</H3>
<PRE>
public int <B>getSize</B>()</PRE>
<DL>
<DD>Return the byte size of the data array.
    <p>
    For a DatabaseEntry that is used as an output parameter, the size
    will always be the length of the data array.
    <p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>Number of bytes in the byte array to be included.</DL>
</DD>
</DL>
<HR>

<A NAME="setSize(int)"><!-- --></A><H3>
setSize</H3>
<PRE>
public void <B>setSize</B>(int&nbsp;size)</PRE>
<DL>
<DD>Set the byte size of the data array.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - Number of bytes in the byte array to be included.</DL>
</DD>
</DL>
<HR>

<A NAME="getUserBuffer()"><!-- --></A><H3>
getUserBuffer</H3>
<PRE>
public boolean <B>getUserBuffer</B>()</PRE>
<DL>
<DD>Return true if the whether the buffer in this entry is owned by the
    application.
<p>
This method may be called at any time during the life of the application.
<p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>True if the whether the buffer in this entry is owned by the
    application.</DL>
</DD>
</DL>
<HR>

<A NAME="getUserBufferLength()"><!-- --></A><H3>
getUserBufferLength</H3>
<PRE>
public int <B>getUserBufferLength</B>()</PRE>
<DL>
<DD>Return the length of the application's buffer.
<p>
This method may be called at any time during the life of the application.
<p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The length of the application's buffer.</DL>
</DD>
</DL>
<HR>

<A NAME="setUserBuffer(int, boolean)"><!-- --></A><H3>
setUserBuffer</H3>
<PRE>
public void <B>setUserBuffer</B>(int&nbsp;length,
                          boolean&nbsp;usermem)</PRE>
<DL>
<DD>Configures the entry with an application-owned buffer.
    <p>
    The <code>data</code> field of the entry must refer to a buffer that is
    at least <code>length</code> bytes in length.
    <p>
    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
    <code>data</code> field refers.  Otherwise, the <code>size</code> field
    is set to the length needed for the requested item, and a
    <A HREF="../../../com/sleepycat/db/MemoryException.html" title="class in com.sleepycat.db"><CODE>MemoryException</CODE></A> is thrown.
    <p>
    Applications can determine the length of a record by setting
    <code>length</code> to 0 and calling <A HREF="../../../com/sleepycat/db/DatabaseEntry.html#getSize()"><CODE>DatabaseEntry.getSize</CODE></A>
    on the return value.
    <p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>length</CODE> - the length of the buffer
    <p><DD><CODE>usermem</CODE> - whether the buffer is owned by the application</DL>
</DD>
</DL>
<HR>

<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;o)</PRE>
<DL>
<DD>Compares the data of two entries for byte-by-byte equality.

 <p>In either entry, if the offset is non-zero or the size is not equal
 to the data array length, then only the data bounded by these values is
 compared.  The data array length and offset need not be the same in both
 entries for them to be considered equal.</p>

 <p>If the data array is null in one entry, then to be considered equal
 both entries must have a null data array.</p>

 <p>If the partial property is set in either entry, then to be considered
 equal both entries must have the same partial properties: partial,
 partialOffset and partialLength.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>Returns a hash code based on the data value.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DatabaseEntry.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Berkeley DB</b><br><font size="-1"> version 5.3.28</font></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?com/sleepycat/db/DatabaseEntry.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="DatabaseEntry.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<font size=1>Copyright (c) 1996, 2013 Oracle and/or its affiliates.  All rights reserved.</font>
</BODY>
</HTML>