blob: 72a3b2c516428439a81ba06dbe0c78a092031f38 [file] [log] [blame]
<!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 (1.8.0_162) on Tue Dec 04 17:15:14 PST 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BaseBuffer (com.yahoo.datasketches:memory 0.12.1 API)</title>
<meta name="date" content="2018-12-04">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="BaseBuffer (com.yahoo.datasketches:memory 0.12.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":9,"i9":9,"i10":9,"i11":9,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"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,"i32":10,"i33":10,"i34":10,"i35":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= 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="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../com/yahoo/memory/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BaseBuffer.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>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yahoo/memory/BaseBuffer.html" target="_top">Frames</a></li>
<li><a href="BaseBuffer.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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>Constr&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>Constr&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.yahoo.memory</div>
<h2 title="Class BaseBuffer" class="title">Class BaseBuffer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.yahoo.memory.BaseBuffer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory">Buffer</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">BaseBuffer</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">A new positional API. This is different from and simpler than Java Buffer positional approach.
<ul><li>All based on longs instead of ints.</li>
<li>Eliminated "mark". Rarely used and confusing with its silent side effects.</li>
<li>The invariants are <code>0 &lt;= start &lt;= position &lt;= end &lt;= capacity</code>.</li>
<li>It always starts up as (0, 0, capacity, capacity).</li>
<li>You set (start, position, end) in one call with
<a href="../../../com/yahoo/memory/BaseBuffer.html#setStartPositionEnd-long-long-long-"><code>setStartPositionEnd(long, long, long)</code></a></li>
<li>Position can be set directly or indirectly when using the positional get/put methods.
<li>Added incrementPosition(long), which is much easier when you know the increment.</li>
<li>This approach eliminated a number of methods and checks, and has no unseen side effects,
e.g., mark being invalidated.</li>
<li>Clearer method naming (IMHO).</li>
</ul></div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Lee Rhodes</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#checkValidAndBounds-long-long-">checkValidAndBounds</a></span>(long&nbsp;offsetBytes,
long&nbsp;lengthBytes)</code>
<div class="block">Checks that the specified range of bytes is within bounds of this object, throws
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if it's not: i.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#equals-java.lang.Object-">equals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;that)</code>
<div class="block">Returns true if the given object is an instance of this class and has equal data contents.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#equalTo-long-java.lang.Object-long-long-">equalTo</a></span>(long&nbsp;thisOffsetBytes,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;that,
long&nbsp;thatOffsetBytes,
long&nbsp;lengthBytes)</code>
<div class="block">Returns true if the given object is an instance of this class and has equal contents to
this object in the given range of bytes.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getByteBuffer--">getByteBuffer</a></span>()</code>
<div class="block">Gets the backing ByteBuffer if it exists, otherwise returns null.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getByteOrder--">getByteOrder</a></span>()</code>
<div class="block">Gets the current ByteOrder.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getCapacity--">getCapacity</a></span>()</code>
<div class="block">Gets the capacity of this object in bytes</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getCumulativeOffset--">getCumulativeOffset</a></span>()</code>
<div class="block">Gets the cumulative offset in bytes of this object from the backing resource.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getCumulativeOffset-long-">getCumulativeOffset</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the cumulative offset in bytes of this object from the backing resource including the given
offsetBytes.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getCurrentDirectMemoryAllocated--">getCurrentDirectMemoryAllocated</a></span>()</code>
<div class="block">Gets the current size of active direct memory allocated.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getCurrentDirectMemoryAllocations--">getCurrentDirectMemoryAllocations</a></span>()</code>
<div class="block">Gets the current number of active direct memory allocations.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getCurrentDirectMemoryMapAllocated--">getCurrentDirectMemoryMapAllocated</a></span>()</code>
<div class="block">Gets the current size of active direct memory map allocated.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getCurrentDirectMemoryMapAllocations--">getCurrentDirectMemoryMapAllocations</a></span>()</code>
<div class="block">Gets the current number of active direct memory map allocations.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getEnd--">getEnd</a></span>()</code>
<div class="block">Gets the end position</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getPosition--">getPosition</a></span>()</code>
<div class="block">Gets the current position</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getRegionOffset--">getRegionOffset</a></span>()</code>
<div class="block">Returns the offset of address zero of this object relative to the address zero of the
backing resource but not including the size of any Java object header.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getRegionOffset-long-">getRegionOffset</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Returns the offset of address zero of this object relative to the address zero of the
backing resource plus the given offsetBytes but not including the size of any Java object
header.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getRemaining--">getRemaining</a></span>()</code>
<div class="block">The number of elements remaining between the current position and the end position</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#getStart--">getStart</a></span>()</code>
<div class="block">Gets start position</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#hasArray--">hasArray</a></span>()</code>
<div class="block">Returns true if this object is backed by an on-heap primitive array</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#hasByteBuffer--">hasByteBuffer</a></span>()</code>
<div class="block">Returns true if this Memory is backed by a ByteBuffer.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#hashCode--">hashCode</a></span>()</code>
<div class="block">Returns the hashCode of this object.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#hasRemaining--">hasRemaining</a></span>()</code>
<div class="block">Returns true if there are elements remaining between the current position and the end position</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#incrementAndCheckPosition-long-">incrementAndCheckPosition</a></span>(long&nbsp;increment)</code>
<div class="block">Increments the current position by the given increment.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#incrementPosition-long-">incrementPosition</a></span>(long&nbsp;increment)</code>
<div class="block">Increments the current position by the given increment.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#isDirect--">isDirect</a></span>()</code>
<div class="block">Returns true if the backing resource is direct (off-heap) memory.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#isNativeOrder--">isNativeOrder</a></span>()</code>
<div class="block">Returns true if the current byte order is native order.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#isReadOnly--">isReadOnly</a></span>()</code>
<div class="block">Returns true if this object or the backing resource is read-only.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#isSameResource-java.lang.Object-">isSameResource</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;that)</code>
<div class="block">Returns true if the backing resource of <i>this</i> is identical with the backing resource
of <i>that</i>.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#isValid--">isValid</a></span>()</code>
<div class="block">Returns true if this object is valid and has not been closed.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code><a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#resetPosition--">resetPosition</a></span>()</code>
<div class="block">Resets the current position to the start position,
This does not modify any data.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code><a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#setAndCheckPosition-long-">setAndCheckPosition</a></span>(long&nbsp;position)</code>
<div class="block">Sets the current position.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code><a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#setAndCheckStartPositionEnd-long-long-long-">setAndCheckStartPositionEnd</a></span>(long&nbsp;start,
long&nbsp;position,
long&nbsp;end)</code>
<div class="block">Sets start position, current position, and end position.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code><a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#setPosition-long-">setPosition</a></span>(long&nbsp;position)</code>
<div class="block">Sets the current position.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code><a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#setStartPositionEnd-long-long-long-">setStartPositionEnd</a></span>(long&nbsp;start,
long&nbsp;position,
long&nbsp;end)</code>
<div class="block">Sets start position, current position, and end position.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#toHexString-java.lang.String-long-int-">toHexString</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;header,
long&nbsp;offsetBytes,
int&nbsp;lengthBytes)</code>
<div class="block">Returns a formatted hex string of a range of this object.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/BaseBuffer.html#xxHash64-long-long-long-">xxHash64</a></span>(long&nbsp;offsetBytes,
long&nbsp;lengthBytes,
long&nbsp;seed)</code>
<div class="block">Returns the 64-bit hash of the sequence of bytes in this object specified by
<i>offsetBytes</i>, <i>lengthBytes</i> and a <i>seed</i>.</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.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="incrementPosition-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>incrementPosition</h4>
<pre>public final&nbsp;<a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a>&nbsp;incrementPosition(long&nbsp;increment)</pre>
<div class="block">Increments the current position by the given increment.
Asserts that the resource is valid and that the positional invariants are not violated,
otherwise, if asserts are enabled throws an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang"><code>AssertionError</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>increment</code> - the given increment</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="incrementAndCheckPosition-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>incrementAndCheckPosition</h4>
<pre>public final&nbsp;<a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a>&nbsp;incrementAndCheckPosition(long&nbsp;increment)</pre>
<div class="block">Increments the current position by the given increment.
Checks that the resource is valid and that the positional invariants are not violated,
otherwise throws an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>increment</code> - the given increment</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="getEnd--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEnd</h4>
<pre>public final&nbsp;long&nbsp;getEnd()</pre>
<div class="block">Gets the end position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the end position</dd>
</dl>
</li>
</ul>
<a name="getPosition--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPosition</h4>
<pre>public final&nbsp;long&nbsp;getPosition()</pre>
<div class="block">Gets the current position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current position</dd>
</dl>
</li>
</ul>
<a name="getStart--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStart</h4>
<pre>public final&nbsp;long&nbsp;getStart()</pre>
<div class="block">Gets start position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>start position</dd>
</dl>
</li>
</ul>
<a name="getRemaining--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemaining</h4>
<pre>public final&nbsp;long&nbsp;getRemaining()</pre>
<div class="block">The number of elements remaining between the current position and the end position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>(end - position)</code></dd>
</dl>
</li>
</ul>
<a name="hasRemaining--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasRemaining</h4>
<pre>public final&nbsp;boolean&nbsp;hasRemaining()</pre>
<div class="block">Returns true if there are elements remaining between the current position and the end position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>(end - position) &gt; 0</code></dd>
</dl>
</li>
</ul>
<a name="resetPosition--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetPosition</h4>
<pre>public final&nbsp;<a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a>&nbsp;resetPosition()</pre>
<div class="block">Resets the current position to the start position,
This does not modify any data.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="setPosition-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPosition</h4>
<pre>public final&nbsp;<a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a>&nbsp;setPosition(long&nbsp;position)</pre>
<div class="block">Sets the current position.
Asserts that the positional invariants are not violated,
otherwise, if asserts are enabled throws an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang"><code>AssertionError</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the given current position.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="setAndCheckPosition-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAndCheckPosition</h4>
<pre>public final&nbsp;<a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a>&nbsp;setAndCheckPosition(long&nbsp;position)</pre>
<div class="block">Sets the current position.
Checks that the positional invariants are not violated,
otherwise, throws an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the given current position.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="setStartPositionEnd-long-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStartPositionEnd</h4>
<pre>public final&nbsp;<a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a>&nbsp;setStartPositionEnd(long&nbsp;start,
long&nbsp;position,
long&nbsp;end)</pre>
<div class="block">Sets start position, current position, and end position.
Asserts that the positional invariants are not violated,
otherwise, if asserts are enabled throws an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang"><code>AssertionError</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>start</code> - the start position in the buffer</dd>
<dd><code>position</code> - the current position between the start and end</dd>
<dd><code>end</code> - the end position in the buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="setAndCheckStartPositionEnd-long-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAndCheckStartPositionEnd</h4>
<pre>public final&nbsp;<a href="../../../com/yahoo/memory/BaseBuffer.html" title="class in com.yahoo.memory">BaseBuffer</a>&nbsp;setAndCheckStartPositionEnd(long&nbsp;start,
long&nbsp;position,
long&nbsp;end)</pre>
<div class="block">Sets start position, current position, and end position.
Checks that the positional invariants are not violated,
otherwise, throws an <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>start</code> - the start position in the buffer</dd>
<dd><code>position</code> - the current position between the start and end</dd>
<dd><code>end</code> - the end position in the buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public final&nbsp;boolean&nbsp;equals(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;that)</pre>
<div class="block">Returns true if the given object is an instance of this class and has equal data contents.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>that</code> - the given object</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given Object is an instance of this class and has equal data contents.</dd>
</dl>
</li>
</ul>
<a name="equalTo-long-java.lang.Object-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equalTo</h4>
<pre>public final&nbsp;boolean&nbsp;equalTo(long&nbsp;thisOffsetBytes,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;that,
long&nbsp;thatOffsetBytes,
long&nbsp;lengthBytes)</pre>
<div class="block">Returns true if the given object is an instance of this class and has equal contents to
this object in the given range of bytes. This will also check two distinct ranges within the
same object for eauals.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>thisOffsetBytes</code> - the starting offset in bytes for this object.</dd>
<dd><code>that</code> - the given object</dd>
<dd><code>thatOffsetBytes</code> - the starting offset in bytes for the given object</dd>
<dd><code>lengthBytes</code> - the size of the range in bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given object has equal contents to this object in the given range of
bytes.</dd>
</dl>
</li>
</ul>
<a name="getByteBuffer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteBuffer</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;getByteBuffer()</pre>
<div class="block">Gets the backing ByteBuffer if it exists, otherwise returns null.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the backing ByteBuffer if it exists, otherwise returns null.</dd>
</dl>
</li>
</ul>
<a name="getByteOrder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteOrder</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a>&nbsp;getByteOrder()</pre>
<div class="block">Gets the current ByteOrder.
This may be different from the ByteOrder of the backing resource.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current ByteOrder.</dd>
</dl>
</li>
</ul>
<a name="getCapacity--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCapacity</h4>
<pre>public final&nbsp;long&nbsp;getCapacity()</pre>
<div class="block">Gets the capacity of this object in bytes</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the capacity of this object in bytes</dd>
</dl>
</li>
</ul>
<a name="getCumulativeOffset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCumulativeOffset</h4>
<pre>public final&nbsp;long&nbsp;getCumulativeOffset()</pre>
<div class="block">Gets the cumulative offset in bytes of this object from the backing resource.
This offset may also include other offset components such as the native off-heap
memory address, DirectByteBuffer split offsets, region offsets, and unsafe arrayBaseOffsets.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the cumulative offset in bytes of this object from the backing resource.</dd>
</dl>
</li>
</ul>
<a name="getCumulativeOffset-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCumulativeOffset</h4>
<pre>public final&nbsp;long&nbsp;getCumulativeOffset(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the cumulative offset in bytes of this object from the backing resource including the given
offsetBytes. This offset may also include other offset components such as the native off-heap
memory address, DirectByteBuffer split offsets, region offsets, and unsafe arrayBaseOffsets.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset to be added to the cumulative offset.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the cumulative offset in bytes of this object from the backing resource including the
given offsetBytes.</dd>
</dl>
</li>
</ul>
<a name="getRegionOffset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRegionOffset</h4>
<pre>public final&nbsp;long&nbsp;getRegionOffset()</pre>
<div class="block">Returns the offset of address zero of this object relative to the address zero of the
backing resource but not including the size of any Java object header.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the offset of address zero of this object relative to the address zero of the
backing resource but not including the size of any Java object header.</dd>
</dl>
</li>
</ul>
<a name="getRegionOffset-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRegionOffset</h4>
<pre>public final&nbsp;long&nbsp;getRegionOffset(long&nbsp;offsetBytes)</pre>
<div class="block">Returns the offset of address zero of this object relative to the address zero of the
backing resource plus the given offsetBytes but not including the size of any Java object
header.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - the given offsetBytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the offset of address zero of this object relative to the address zero of the
backing resource plus the given offsetBytes but not including the size of any Java object
header.</dd>
</dl>
</li>
</ul>
<a name="hasArray--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasArray</h4>
<pre>public final&nbsp;boolean&nbsp;hasArray()</pre>
<div class="block">Returns true if this object is backed by an on-heap primitive array</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this object is backed by an on-heap primitive array</dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public final&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Returns the hashCode of this object.
<p>The hash code of this object depends upon all of its contents.
Because of this, it is inadvisable to use these objects as keys in hash maps
or similar data structures unless it is known that their contents will not change.</p>
<p>If it is desirable to use these objects in a hash map depending only on object identity,
than the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/IdentityHashMap.html?is-external=true" title="class or interface in java.util"><code>IdentityHashMap</code></a> can be used.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the hashCode of this object.</dd>
</dl>
</li>
</ul>
<a name="xxHash64-long-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>xxHash64</h4>
<pre>public final&nbsp;long&nbsp;xxHash64(long&nbsp;offsetBytes,
long&nbsp;lengthBytes,
long&nbsp;seed)</pre>
<div class="block">Returns the 64-bit hash of the sequence of bytes in this object specified by
<i>offsetBytes</i>, <i>lengthBytes</i> and a <i>seed</i>. Note that the sequence of bytes is
always processed in the same order independent of endianness.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - the given offset in bytes to the first byte of the byte sequence.</dd>
<dd><code>lengthBytes</code> - the given length in bytes of the byte sequence.</dd>
<dd><code>seed</code> - the given long seed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the 64-bit hash of the sequence of bytes in this object specified by
<i>offsetBytes</i> and <i>lengthBytes</i>.</dd>
</dl>
</li>
</ul>
<a name="hasByteBuffer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasByteBuffer</h4>
<pre>public final&nbsp;boolean&nbsp;hasByteBuffer()</pre>
<div class="block">Returns true if this Memory is backed by a ByteBuffer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this Memory is backed by a ByteBuffer.</dd>
</dl>
</li>
</ul>
<a name="isDirect--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDirect</h4>
<pre>public final&nbsp;boolean&nbsp;isDirect()</pre>
<div class="block">Returns true if the backing resource is direct (off-heap) memory.
This is the case for allocated direct memory, memory mapped files,</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the backing resource is direct (off-heap) memory.</dd>
</dl>
</li>
</ul>
<a name="isNativeOrder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNativeOrder</h4>
<pre>public final&nbsp;boolean&nbsp;isNativeOrder()</pre>
<div class="block">Returns true if the current byte order is native order.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the current byte order is native order.</dd>
</dl>
</li>
</ul>
<a name="isReadOnly--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReadOnly</h4>
<pre>public final&nbsp;boolean&nbsp;isReadOnly()</pre>
<div class="block">Returns true if this object or the backing resource is read-only.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this object or the backing resource is read-only.</dd>
</dl>
</li>
</ul>
<a name="isSameResource-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSameResource</h4>
<pre>public final&nbsp;boolean&nbsp;isSameResource(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;that)</pre>
<div class="block">Returns true if the backing resource of <i>this</i> is identical with the backing resource
of <i>that</i>. The capacities must be the same. If <i>this</i> is a region,
the region offset must also be the same.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>that</code> - A different non-null object</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the backing resource of <i>this</i> is the same as the backing resource
of <i>that</i>.</dd>
</dl>
</li>
</ul>
<a name="isValid--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isValid</h4>
<pre>public&nbsp;boolean&nbsp;isValid()</pre>
<div class="block">Returns true if this object is valid and has not been closed.
This is relevant only for direct (off-heap) memory and Mapped Files.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this object is valid and has not been closed.</dd>
</dl>
</li>
</ul>
<a name="checkValidAndBounds-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkValidAndBounds</h4>
<pre>public final&nbsp;void&nbsp;checkValidAndBounds(long&nbsp;offsetBytes,
long&nbsp;lengthBytes)</pre>
<div class="block">Checks that the specified range of bytes is within bounds of this object, throws
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang"><code>IllegalArgumentException</code></a> if it's not: i. e. if offsetBytes &lt; 0, or length &lt; 0,
or offsetBytes + length &gt; <a href="../../../com/yahoo/memory/BaseBuffer.html#getCapacity--"><code>getCapacity()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - the given offset in bytes of this object</dd>
<dd><code>lengthBytes</code> - the given length in bytes of this object</dd>
</dl>
</li>
</ul>
<a name="getCurrentDirectMemoryAllocations--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentDirectMemoryAllocations</h4>
<pre>public static final&nbsp;long&nbsp;getCurrentDirectMemoryAllocations()</pre>
<div class="block">Gets the current number of active direct memory allocations.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current number of active direct memory allocations.</dd>
</dl>
</li>
</ul>
<a name="getCurrentDirectMemoryAllocated--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentDirectMemoryAllocated</h4>
<pre>public static final&nbsp;long&nbsp;getCurrentDirectMemoryAllocated()</pre>
<div class="block">Gets the current size of active direct memory allocated.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current size of active direct memory allocated.</dd>
</dl>
</li>
</ul>
<a name="getCurrentDirectMemoryMapAllocations--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentDirectMemoryMapAllocations</h4>
<pre>public static final&nbsp;long&nbsp;getCurrentDirectMemoryMapAllocations()</pre>
<div class="block">Gets the current number of active direct memory map allocations.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current number of active direct memory map allocations.</dd>
</dl>
</li>
</ul>
<a name="getCurrentDirectMemoryMapAllocated--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentDirectMemoryMapAllocated</h4>
<pre>public static final&nbsp;long&nbsp;getCurrentDirectMemoryMapAllocated()</pre>
<div class="block">Gets the current size of active direct memory map allocated.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current size of active direct memory map allocated.</dd>
</dl>
</li>
</ul>
<a name="toHexString-java.lang.String-long-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toHexString</h4>
<pre>public final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toHexString(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;header,
long&nbsp;offsetBytes,
int&nbsp;lengthBytes)</pre>
<div class="block">Returns a formatted hex string of a range of this object.
Used primarily for testing.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>header</code> - a descriptive header</dd>
<dd><code>offsetBytes</code> - offset bytes relative to this object start</dd>
<dd><code>lengthBytes</code> - number of bytes to convert to a hex string</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a formatted hex string in a human readable array</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="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../com/yahoo/memory/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BaseBuffer.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>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/yahoo/memory/BaseBuffer.html" target="_top">Frames</a></li>
<li><a href="BaseBuffer.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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>Constr&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>Constr&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>Copyright &#169; 2015&#x2013;2018 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p>
</body>
</html>