mirror of
https://github.com/yasuhirokimura/db18
synced 2026-06-08 18:29:23 +00:00
1328 lines
51 KiB
HTML
1328 lines
51 KiB
HTML
<!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 (11.0.7) on Mon Jun 01 06:40:53 PDT 2020 -->
|
|
<title>DatabaseEntry (Oracle - Berkeley DB Java API)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="date" content="2020-06-01">
|
|
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
|
|
<script type="text/javascript" src="../../../script.js"></script>
|
|
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
|
|
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
|
<!--[if IE]>
|
|
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="../../../jquery/jquery-3.4.1.js"></script>
|
|
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="DatabaseEntry (Oracle - Berkeley DB Java API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":10,"i1":42,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":42,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
var pathtoroot = "../../../";
|
|
var useModuleDirectories = true;
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<div class="fixedNav">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../index.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"><b>Berkeley DB</b><br><font size="-1"> version 18.1.40</font></div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<ul class="navListSearch">
|
|
<li><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</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>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </div>
|
|
<script type="text/javascript"><!--
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|
//-->
|
|
</script>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.sleepycat.db</a></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><code><a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a></code></dd>
|
|
</dl>
|
|
<hr>
|
|
<pre>public class <span class="typeNameLabel">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="Database.html" title="class in com.sleepycat.db"><code>Database</code></a> and <a href="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="Database.html" title="class in com.sleepycat.db"><code>Database</code></a> or <a href="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="../bind/package-summary.html"><code>com.sleepycat.bind</code></a> package.
|
|
<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="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="#setReuseBuffer-boolean-"><code>setReuseBuffer(boolean)</code></a> or <a href="#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="#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="#getData--"><code>getData()</code></a> without danger that the array will be overwritten in
|
|
a subsequent call.
|
|
<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.
|
|
<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="#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.</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="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Constructor</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#DatabaseEntry--">DatabaseEntry</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Construct a DatabaseEntry with null data.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#DatabaseEntry-byte:A-">DatabaseEntry</a></span>​(byte[] data)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Construct a DatabaseEntry with a given byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#DatabaseEntry-byte:A-int-int-">DatabaseEntry</a></span>​(byte[] data,
|
|
int offset,
|
|
int size)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Constructs a DatabaseEntry with a given byte array, offset and size.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#DatabaseEntry-java.nio.ByteBuffer-">DatabaseEntry</a></span>​(java.nio.ByteBuffer data)</code></th>
|
|
<td class="colLast">
|
|
<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="memberSummary" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals-java.lang.Object-">equals</a></span>​(java.lang.Object o)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Compares the data of two entries for byte-by-byte equality.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBlob--">getBlob</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Replaced with <a href="#getExternalFile--"><code>getExternalFile()</code></a>.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getData--">getData</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return the byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>java.nio.ByteBuffer</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDataNIO--">getDataNIO</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return the java.nio.ByteBuffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getExternalFile--">getExternalFile</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return whether this DatabaseEntry is configured to be stored as an external
|
|
file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getOffset--">getOffset</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return the byte offset into the data array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPartial--">getPartial</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return whether this DatabaseEntry is configured to read or write partial
|
|
records.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPartialLength--">getPartialLength</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return the byte length of the partial record being read or written by
|
|
the application, in bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPartialOffset--">getPartialOffset</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return the offset of the partial record being read or written by the
|
|
application, in bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReadOnly--">getReadOnly</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return whether this DatabaseEntry is configured as read only.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRecordNumber--">getRecordNumber</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return the record number encoded in this entry's buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReuseBuffer--">getReuseBuffer</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return true if the whether the entry is configured to reuse the buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSize--">getSize</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return the byte size of the data array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUserBuffer--">getUserBuffer</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return true if the whether the buffer in this entry is owned by the
|
|
application.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUserBufferLength--">getUserBufferLength</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return the length of the application's buffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode--">hashCode</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a hash code based on the data value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBlob-boolean-">setBlob</a></span>​(boolean externalFile)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Replaced with <a href="#setExternalFile-boolean-"><code>setExternalFile(boolean)</code></a>.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setData-byte:A-">setData</a></span>​(byte[] data)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setData-byte:A-int-int-">setData</a></span>​(byte[] data,
|
|
int offset,
|
|
int size)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the byte array, offset and size.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDataNIO-java.nio.ByteBuffer-">setDataNIO</a></span>​(java.nio.ByteBuffer data)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the java.nio.ByteBuffer.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDataNIO-java.nio.ByteBuffer-int-int-">setDataNIO</a></span>​(java.nio.ByteBuffer data,
|
|
int offset,
|
|
int size)</code></th>
|
|
<td class="colLast">
|
|
<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 id="i21" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setExternalFile-boolean-">setExternalFile</a></span>​(boolean externalFile)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Configure this DatabaseEntry to be stored as an external file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setOffset-int-">setOffset</a></span>​(int offset)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the byte offset into the data array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPartial-boolean-">setPartial</a></span>​(boolean partial)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Configure this DatabaseEntry to read or write partial records.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPartial-int-int-boolean-">setPartial</a></span>​(int doff,
|
|
int dlen,
|
|
boolean partial)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Configures this DatabaseEntry to read or write partial records.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPartialLength-int-">setPartialLength</a></span>​(int dlen)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the byte length of the partial record being read or written by
|
|
the application, in bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPartialOffset-int-">setPartialOffset</a></span>​(int doff)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the offset of the partial record being read or written by the
|
|
application, in bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setReadOnly-boolean-">setReadOnly</a></span>​(boolean readonly)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Configure this DatabaseEntry as read only.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRecordNumber-int-">setRecordNumber</a></span>​(int recno)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Initialize the entry from a logical record number.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setReuseBuffer-boolean-">setReuseBuffer</a></span>​(boolean reuse)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Configures the entry to try to reuse the buffer before allocating a new
|
|
one.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSize-int-">setSize</a></span>​(int size)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the byte size of the data array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setUserBuffer-int-boolean-">setUserBuffer</a></span>​(int length,
|
|
boolean usermem)</code></th>
|
|
<td class="colLast">
|
|
<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 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 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-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DatabaseEntry</h4>
|
|
<pre>public DatabaseEntry​(byte[] 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="paramLabel">Parameters:</span></dt>
|
|
<dd><code>data</code> - Byte array wrapped by the DatabaseEntry.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="DatabaseEntry-byte:A-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DatabaseEntry</h4>
|
|
<pre>public DatabaseEntry​(byte[] data,
|
|
int offset,
|
|
int size)</pre>
|
|
<div class="block">Constructs a DatabaseEntry with a given byte array, offset and size.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">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 DatabaseEntry​(java.nio.ByteBuffer 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="paramLabel">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 class="methodSignature">@Deprecated
|
|
public void setBlob​(boolean externalFile)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Replaced with <a href="#setExternalFile-boolean-"><code>setExternalFile(boolean)</code></a>.
|
|
<p></div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>externalFile</code> - Whether this DatabaseEntry is configured to be stored as an external file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getBlob--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBlob</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public boolean getBlob()</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Replaced with <a href="#getExternalFile--"><code>getExternalFile()</code></a>.
|
|
<p></div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether this DatabaseEntry is configured to be stored as an external file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getData--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getData</h4>
|
|
<pre class="methodSignature">public byte[] 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="returnLabel">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 class="methodSignature">public java.nio.ByteBuffer 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="returnLabel">Returns:</span></dt>
|
|
<dd>The underlying java.nio.ByteBuffer.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setData-byte:A-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setData</h4>
|
|
<pre class="methodSignature">public void setData​(byte[] data,
|
|
int offset,
|
|
int size)</pre>
|
|
<div class="block">Sets the byte array, offset and size.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">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-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setData</h4>
|
|
<pre class="methodSignature">public void setData​(byte[] 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="paramLabel">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 class="methodSignature">public void setDataNIO​(java.nio.ByteBuffer data,
|
|
int offset,
|
|
int 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="paramLabel">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 class="methodSignature">public void setDataNIO​(java.nio.ByteBuffer 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="#setUserBuffer-int-boolean-"><code>setUserBuffer(int, boolean)</code></a> is required
|
|
after setting the ByteBuffer.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>data</code> - java.nio.ByteBuffer wrapped by the DatabaseEntry.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setExternalFile-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setExternalFile</h4>
|
|
<pre class="methodSignature">public void setExternalFile​(boolean externalFile)</pre>
|
|
<div class="block">Configure this DatabaseEntry to be stored as an external file.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>externalFile</code> - Whether this DatabaseEntry is configured to be stored as an external file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getExternalFile--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getExternalFile</h4>
|
|
<pre class="methodSignature">public boolean getExternalFile()</pre>
|
|
<div class="block">Return whether this DatabaseEntry is configured to be stored as an external
|
|
file.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether this DatabaseEntry is configured to be stored as an external file.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getOffset--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getOffset</h4>
|
|
<pre class="methodSignature">public int 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="returnLabel">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 class="methodSignature">public void setOffset​(int offset)</pre>
|
|
<div class="block">Set the byte offset into the data array.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">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 class="methodSignature">public int 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="returnLabel">Returns:</span></dt>
|
|
<dd>The byte length of the partial record being read or written by the
|
|
application, in bytes.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#setPartial-int-int-boolean-"><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 class="methodSignature">public int 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="returnLabel">Returns:</span></dt>
|
|
<dd>The offset of the partial record being read or written by the
|
|
application, in bytes.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#setPartial-int-int-boolean-"><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 class="methodSignature">public boolean 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="returnLabel">Returns:</span></dt>
|
|
<dd>Whether this DatabaseEntry is configured to read or write partial
|
|
records.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#setPartial-int-int-boolean-"><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 class="methodSignature">public void setPartialOffset​(int 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="paramLabel">Parameters:</span></dt>
|
|
<dd><code>doff</code> - The offset of the partial record being read or written by the
|
|
application, in bytes.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#setPartial-int-int-boolean-"><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 class="methodSignature">public void setPartialLength​(int 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="paramLabel">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="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#setPartial-int-int-boolean-"><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 class="methodSignature">public void setPartial​(boolean 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="paramLabel">Parameters:</span></dt>
|
|
<dd><code>partial</code> - Whether this DatabaseEntry is configured to read or write partial
|
|
records.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#setPartial-int-int-boolean-"><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 class="methodSignature">public void setPartial​(int doff,
|
|
int dlen,
|
|
boolean 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="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></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">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 class="methodSignature">public boolean getReadOnly()</pre>
|
|
<div class="block">Return whether this DatabaseEntry is configured as read only.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether this DatabaseEntry is configured as read only.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#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 class="methodSignature">public void setReadOnly​(boolean readonly)</pre>
|
|
<div class="block">Configure this DatabaseEntry as read only.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">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 class="methodSignature">public int 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="returnLabel">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 class="methodSignature">public void setRecordNumber​(int 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="paramLabel">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 class="methodSignature">public boolean 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="returnLabel">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 class="methodSignature">public void setReuseBuffer​(boolean 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="paramLabel">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 class="methodSignature">public int 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="returnLabel">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 class="methodSignature">public void setSize​(int size)</pre>
|
|
<div class="block">Set the byte size of the data array.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">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 class="methodSignature">public boolean 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="returnLabel">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 class="methodSignature">public int 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="returnLabel">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 class="methodSignature">public void setUserBuffer​(int length,
|
|
boolean 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="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="#getSize--"><code>DatabaseEntry.getSize</code></a>
|
|
on the return value.
|
|
<p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">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 class="methodSignature">public boolean equals​(java.lang.Object 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><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hashCode--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>hashCode</h4>
|
|
<pre class="methodSignature">public int hashCode()</pre>
|
|
<div class="block">Returns a hash code based on the data value.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>hashCode</code> in class <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>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../index.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"><b>Berkeley DB</b><br><font size="-1"> version 18.1.40</font></div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses.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>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </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, 2020 Oracle and/or its affiliates. All rights reserved.</font></small></p>
|
|
</body>
|
|
</html>
|