summaryrefslogtreecommitdiff
path: root/docs/java/com/sleepycat/db/DatabaseEntry.html
blob: 4e9e66704da3a797035ce707bdb0f863a3337113 (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_60) on Tue Feb 17 12:25:53 EST 2015 -->
<title>DatabaseEntry (Oracle - Berkeley DB Java API)</title>
<meta name="date" content="2015-02-17">
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="DatabaseEntry (Oracle - Berkeley DB Java API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DatabaseEntry.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><b>Berkeley DB</b><br><font size="-1"> version 6.1.23</font></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/sleepycat/db/DatabaseEntry.html" target="_top">Frames</a></li>
<li><a href="DatabaseEntry.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.sleepycat.db</div>
<h2 title="Class DatabaseEntry" class="title">Class DatabaseEntry</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.sleepycat.db.DatabaseEntry</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">DatabaseEntry</span>
extends java.lang.Object</pre>
<div class="block">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,%20com.sleepycat.db.DatabaseEntry,%20com.sleepycat.db.DatabaseEntry,%20com.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,%20boolean)"><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,%20int,%20boolean)"><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.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry()">DatabaseEntry</a></strong>()</code>
<div class="block">Construct a DatabaseEntry with null data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(byte[])">DatabaseEntry</a></strong>(byte[]&nbsp;data)</code>
<div class="block">Construct a DatabaseEntry with a given byte array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(byte[],%20int,%20int)">DatabaseEntry</a></strong>(byte[]&nbsp;data,
             int&nbsp;offset,
             int&nbsp;size)</code>
<div class="block">Constructs a DatabaseEntry with a given byte array, offset and size.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#DatabaseEntry(java.nio.ByteBuffer)">DatabaseEntry</a></strong>(java.nio.ByteBuffer&nbsp;data)</code>
<div class="block">Construct a DatabaseEntry with a given native I/O buffer.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object&nbsp;o)</code>
<div class="block">Compares the data of two entries for byte-by-byte equality.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getBlob()">getBlob</a></strong>()</code>
<div class="block">Return whether this DatabaseEntry is configured to be stored as a blob.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getData()">getData</a></strong>()</code>
<div class="block">Return the byte array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.nio.ByteBuffer</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getDataNIO()">getDataNIO</a></strong>()</code>
<div class="block">Return the java.nio.ByteBuffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getOffset()">getOffset</a></strong>()</code>
<div class="block">Return the byte offset into the data array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getPartial()">getPartial</a></strong>()</code>
<div class="block">Return whether this DatabaseEntry is configured to read or write partial
    records.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getPartialLength()">getPartialLength</a></strong>()</code>
<div class="block">Return the byte length of the partial record being read or written by
    the application, in bytes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getPartialOffset()">getPartialOffset</a></strong>()</code>
<div class="block">Return the offset of the partial record being read or written by the
    application, in bytes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getReadOnly()">getReadOnly</a></strong>()</code>
<div class="block">Return whether this DatabaseEntry is configured as read only.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getRecordNumber()">getRecordNumber</a></strong>()</code>
<div class="block">Return the record number encoded in this entry's buffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getReuseBuffer()">getReuseBuffer</a></strong>()</code>
<div class="block">Return true if the whether the entry is configured to reuse the buffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getSize()">getSize</a></strong>()</code>
<div class="block">Return the byte size of the data array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getUserBuffer()">getUserBuffer</a></strong>()</code>
<div class="block">Return true if the whether the buffer in this entry is owned by the
    application.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#getUserBufferLength()">getUserBufferLength</a></strong>()</code>
<div class="block">Return the length of the application's buffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#hashCode()">hashCode</a></strong>()</code>
<div class="block">Returns a hash code based on the data value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setBlob(boolean)">setBlob</a></strong>(boolean&nbsp;blob)</code>
<div class="block">Configure this DatabaseEntry to be stored as a blob.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setData(byte[])">setData</a></strong>(byte[]&nbsp;data)</code>
<div class="block">Sets the byte array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setData(byte[],%20int,%20int)">setData</a></strong>(byte[]&nbsp;data,
       int&nbsp;offset,
       int&nbsp;size)</code>
<div class="block">Sets the byte array, offset and size.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setDataNIO(java.nio.ByteBuffer)">setDataNIO</a></strong>(java.nio.ByteBuffer&nbsp;data)</code>
<div class="block">Sets the java.nio.ByteBuffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setDataNIO(java.nio.ByteBuffer,%20int,%20int)">setDataNIO</a></strong>(java.nio.ByteBuffer&nbsp;data,
          int&nbsp;offset,
          int&nbsp;size)</code>
<div class="block">Sets the java.nio.ByteBuffer (or the backing array if passed a non-direct
    ByteBuffer,) offset and size.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setOffset(int)">setOffset</a></strong>(int&nbsp;offset)</code>
<div class="block">Set the byte offset into the data array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(boolean)">setPartial</a></strong>(boolean&nbsp;partial)</code>
<div class="block">Configure this DatabaseEntry to read or write partial records.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int,%20int,%20boolean)">setPartial</a></strong>(int&nbsp;doff,
          int&nbsp;dlen,
          boolean&nbsp;partial)</code>
<div class="block">Configures this DatabaseEntry to read or write partial records.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartialLength(int)">setPartialLength</a></strong>(int&nbsp;dlen)</code>
<div class="block">Set the byte length of the partial record being read or written by
    the application, in bytes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartialOffset(int)">setPartialOffset</a></strong>(int&nbsp;doff)</code>
<div class="block">Set the offset of the partial record being read or written by the
    application, in bytes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setReadOnly(boolean)">setReadOnly</a></strong>(boolean&nbsp;readonly)</code>
<div class="block">Configure this DatabaseEntry as read only.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setRecordNumber(int)">setRecordNumber</a></strong>(int&nbsp;recno)</code>
<div class="block">Initialize the entry from a logical record number.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setReuseBuffer(boolean)">setReuseBuffer</a></strong>(boolean&nbsp;reuse)</code>
<div class="block">Configures the entry to try to reuse the buffer before allocating a new
    one.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setSize(int)">setSize</a></strong>(int&nbsp;size)</code>
<div class="block">Set the byte size of the data array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/db/DatabaseEntry.html#setUserBuffer(int,%20boolean)">setUserBuffer</a></strong>(int&nbsp;length,
             boolean&nbsp;usermem)</code>
<div class="block">Configures the entry with an application-owned buffer.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="DatabaseEntry()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DatabaseEntry</h4>
<pre>public&nbsp;DatabaseEntry()</pre>
<div class="block">Construct a DatabaseEntry with null data. The offset and size are set to
    zero.</div>
</li>
</ul>
<a name="DatabaseEntry(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DatabaseEntry</h4>
<pre>public&nbsp;DatabaseEntry(byte[]&nbsp;data)</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - Byte array wrapped by the DatabaseEntry.</dd></dl>
</li>
</ul>
<a name="DatabaseEntry(byte[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DatabaseEntry</h4>
<pre>public&nbsp;DatabaseEntry(byte[]&nbsp;data,
             int&nbsp;offset,
             int&nbsp;size)</pre>
<div class="block">Constructs a DatabaseEntry with a given byte array, offset and size.
    <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - Byte array wrapped by the DatabaseEntry.</dd><dd><code>offset</code> - Offset in the first byte in the byte array to be included.</dd><dd><code>size</code> - Number of bytes in the byte array to be included.</dd></dl>
</li>
</ul>
<a name="DatabaseEntry(java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DatabaseEntry</h4>
<pre>public&nbsp;DatabaseEntry(java.nio.ByteBuffer&nbsp;data)</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - NIO byte buffer wrapped by the DatabaseEntry.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="setBlob(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBlob</h4>
<pre>public&nbsp;void&nbsp;setBlob(boolean&nbsp;blob)</pre>
<div class="block">Configure this DatabaseEntry to be stored as a blob.
    <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>blob</code> - Whether this DatabaseEntry is configured to be stored as a blob.</dd></dl>
</li>
</ul>
<a name="getBlob()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlob</h4>
<pre>public&nbsp;boolean&nbsp;getBlob()</pre>
<div class="block">Return whether this DatabaseEntry is configured to be stored as a blob.
    <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Whether this DatabaseEntry is configured to be stored as a blob.</dd></dl>
</li>
</ul>
<a name="getData()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getData</h4>
<pre>public&nbsp;byte[]&nbsp;getData()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The byte array.</dd></dl>
</li>
</ul>
<a name="getDataNIO()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDataNIO</h4>
<pre>public&nbsp;java.nio.ByteBuffer&nbsp;getDataNIO()</pre>
<div class="block">Return the java.nio.ByteBuffer.
    <p>
    Used to access the underlying data when the DatabaseEntry is
    configured to utilize a java.nio.ByteBuffer.
    <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The underlying java.nio.ByteBuffer.</dd></dl>
</li>
</ul>
<a name="setData(byte[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setData</h4>
<pre>public&nbsp;void&nbsp;setData(byte[]&nbsp;data,
           int&nbsp;offset,
           int&nbsp;size)</pre>
<div class="block">Sets the byte array, offset and size.
    <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - Byte array wrapped by the DatabaseEntry.</dd><dd><code>offset</code> - Offset in the first byte in the byte array to be included.</dd><dd><code>size</code> - Number of bytes in the byte array to be included.</dd></dl>
</li>
</ul>
<a name="setData(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setData</h4>
<pre>public&nbsp;void&nbsp;setData(byte[]&nbsp;data)</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - Byte array wrapped by the DatabaseEntry.</dd></dl>
</li>
</ul>
<a name="setDataNIO(java.nio.ByteBuffer, int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDataNIO</h4>
<pre>public&nbsp;void&nbsp;setDataNIO(java.nio.ByteBuffer&nbsp;data,
              int&nbsp;offset,
              int&nbsp;size)</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - java.nio.ByteBuffer wrapped by the DatabaseEntry.</dd><dd><code>offset</code> - int offset into the ByteBuffer where the DatabaseEntry data begins.</dd><dd><code>size</code> - int size of the ByteBuffer available.</dd></dl>
</li>
</ul>
<a name="setDataNIO(java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDataNIO</h4>
<pre>public&nbsp;void&nbsp;setDataNIO(java.nio.ByteBuffer&nbsp;data)</pre>
<div class="block">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,%20boolean)"><code>setUserBuffer(int, boolean)</code></a> is required
    after setting the ByteBuffer.
    <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - java.nio.ByteBuffer wrapped by the DatabaseEntry.</dd></dl>
</li>
</ul>
<a name="getOffset()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOffset</h4>
<pre>public&nbsp;int&nbsp;getOffset()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Offset in the first byte in the byte array to be included.</dd></dl>
</li>
</ul>
<a name="setOffset(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOffset</h4>
<pre>public&nbsp;void&nbsp;setOffset(int&nbsp;offset)</pre>
<div class="block">Set the byte offset into the data array.
    <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>offset</code> - Offset in the first byte in the byte array to be included.</dd></dl>
</li>
</ul>
<a name="getPartialLength()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartialLength</h4>
<pre>public&nbsp;int&nbsp;getPartialLength()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The byte length of the partial record being read or written by the
    application, in bytes.
    <p></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int,%20int,%20boolean)"><code>setPartial(int,int,boolean)</code></a></dd></dl>
</li>
</ul>
<a name="getPartialOffset()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartialOffset</h4>
<pre>public&nbsp;int&nbsp;getPartialOffset()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The offset of the partial record being read or written by the
    application, in bytes.
    <p></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int,%20int,%20boolean)"><code>setPartial(int,int,boolean)</code></a></dd></dl>
</li>
</ul>
<a name="getPartial()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartial</h4>
<pre>public&nbsp;boolean&nbsp;getPartial()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Whether this DatabaseEntry is configured to read or write partial
    records.
    <p></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int,%20int,%20boolean)"><code>setPartial(int,int,boolean)</code></a></dd></dl>
</li>
</ul>
<a name="setPartialOffset(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPartialOffset</h4>
<pre>public&nbsp;void&nbsp;setPartialOffset(int&nbsp;doff)</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>doff</code> - The offset of the partial record being read or written by the
    application, in bytes.
    <p></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int,%20int,%20boolean)"><code>setPartial(int,int,boolean)</code></a></dd></dl>
</li>
</ul>
<a name="setPartialLength(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPartialLength</h4>
<pre>public&nbsp;void&nbsp;setPartialLength(int&nbsp;dlen)</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dlen</code> - The byte length of the partial record being read or written by the
    <p></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int,%20int,%20boolean)"><code>application, in bytes.</code></a></dd></dl>
</li>
</ul>
<a name="setPartial(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPartial</h4>
<pre>public&nbsp;void&nbsp;setPartial(boolean&nbsp;partial)</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partial</code> - Whether this DatabaseEntry is configured to read or write partial
    records.
    <p></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/sleepycat/db/DatabaseEntry.html#setPartial(int,%20int,%20boolean)"><code>setPartial(int,int,boolean)</code></a></dd></dl>
</li>
</ul>
<a name="setPartial(int, int, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPartial</h4>
<pre>public&nbsp;void&nbsp;setPartial(int&nbsp;doff,
              int&nbsp;dlen,
              boolean&nbsp;partial)</pre>
<div class="block">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,%20com.sleepycat.db.DatabaseEntry,%20com.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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>doff</code> - The offset of the partial record being read or written by the
    application, in bytes.
    <p></dd><dd><code>dlen</code> - The byte length of the partial record being read or written by the
    application, in bytes.
    <p></dd><dd><code>partial</code> - Whether this DatabaseEntry is configured to read or write partial
    records.</dd></dl>
</li>
</ul>
<a name="getReadOnly()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadOnly</h4>
<pre>public&nbsp;boolean&nbsp;getReadOnly()</pre>
<div class="block">Return whether this DatabaseEntry is configured as read only.
    <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Whether this DatabaseEntry is configured as read only.
    <p></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/sleepycat/db/DatabaseEntry.html#setReadOnly(boolean)"><code>setReadOnly(boolean)</code></a></dd></dl>
</li>
</ul>
<a name="setReadOnly(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReadOnly</h4>
<pre>public&nbsp;void&nbsp;setReadOnly(boolean&nbsp;readonly)</pre>
<div class="block">Configure this DatabaseEntry as read only.
    <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>readonly</code> - Whether this DatabaseEntry is configured as read only.</dd></dl>
</li>
</ul>
<a name="getRecordNumber()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRecordNumber</h4>
<pre>public&nbsp;int&nbsp;getRecordNumber()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The record number encoded in this entry's buffer.</dd></dl>
</li>
</ul>
<a name="setRecordNumber(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRecordNumber</h4>
<pre>public&nbsp;void&nbsp;setRecordNumber(int&nbsp;recno)</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>recno</code> - the record number to be encoded</dd></dl>
</li>
</ul>
<a name="getReuseBuffer()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReuseBuffer</h4>
<pre>public&nbsp;boolean&nbsp;getReuseBuffer()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>True if the whether the entry is configured to reuse the buffer.</dd></dl>
</li>
</ul>
<a name="setReuseBuffer(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReuseBuffer</h4>
<pre>public&nbsp;void&nbsp;setReuseBuffer(boolean&nbsp;reuse)</pre>
<div class="block">Configures the entry to try to reuse the buffer before allocating a new
    one.
    <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>reuse</code> - whether to reuse the buffer</dd></dl>
</li>
</ul>
<a name="getSize()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSize</h4>
<pre>public&nbsp;int&nbsp;getSize()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of bytes in the byte array to be included.</dd></dl>
</li>
</ul>
<a name="setSize(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSize</h4>
<pre>public&nbsp;void&nbsp;setSize(int&nbsp;size)</pre>
<div class="block">Set the byte size of the data array.
    <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>size</code> - Number of bytes in the byte array to be included.</dd></dl>
</li>
</ul>
<a name="getUserBuffer()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUserBuffer</h4>
<pre>public&nbsp;boolean&nbsp;getUserBuffer()</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>True if the whether the buffer in this entry is owned by the
    application.</dd></dl>
</li>
</ul>
<a name="getUserBufferLength()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUserBufferLength</h4>
<pre>public&nbsp;int&nbsp;getUserBufferLength()</pre>
<div class="block">Return the length of the application's buffer.
<p>
This method may be called at any time during the life of the application.
<p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The length of the application's buffer.</dd></dl>
</li>
</ul>
<a name="setUserBuffer(int, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUserBuffer</h4>
<pre>public&nbsp;void&nbsp;setUserBuffer(int&nbsp;length,
                 boolean&nbsp;usermem)</pre>
<div class="block">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></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>length</code> - the length of the buffer
    <p></dd><dd><code>usermem</code> - whether the buffer is owned by the application</dd></dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;o)</pre>
<div class="block">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.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Returns a hash code based on the data value.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DatabaseEntry.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><b>Berkeley DB</b><br><font size="-1"> version 6.1.23</font></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/sleepycat/db/DatabaseEntry.html" target="_top">Frames</a></li>
<li><a href="DatabaseEntry.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size=1>Copyright (c) 1996, 2015 Oracle and/or its affiliates.  All rights reserved.</font></small></p>
</body>
</html>