blob: 9a53f53480d5612dfab7b80680ad3e043ff6648a [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_121) on Wed Mar 29 09:52:54 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Memory (com.yahoo.datasketches:memory 0.9.9-SNAPSHOT API)</title>
<meta name="date" content="2017-03-29">
<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="Memory (com.yahoo.datasketches:memory 0.9.9-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":9,"i13":9,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6,"i29":6,"i30":9,"i31":9,"i32":6,"i33":6,"i34":6,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/Memory.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><a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yahoo/memory/MemoryMapHandler.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/Memory.html" target="_top">Frames</a></li>
<li><a href="Memory.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><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.yahoo.memory</div>
<h2 title="Class Memory" class="title">Class Memory</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://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.Memory</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/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">Memory</span>
extends <a href="http://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">Provides read-only primitive and primitive array methods to any of the four resources
mentioned in the package level documentation.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Lee Rhodes</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/yahoo/memory/package-summary.html"><code>com.yahoo.memory</code></a></dd>
</dl>
</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" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#Memory--">Memory</a></span>()</code>&nbsp;</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" 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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>abstract <a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory">Buffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#asBuffer--">asBuffer</a></span>()</code>
<div class="block">Convert this Memory to a Buffer</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#compareTo-long-long-com.yahoo.memory.Memory-long-long-">compareTo</a></span>(long&nbsp;thisOffsetBytes,
long&nbsp;thisLengthBytes,
<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;that,
long&nbsp;thatOffsetBytes,
long&nbsp;thatLengthBytes)</code>
<div class="block">Compares the bytes of this Memory to <i>that</i> Memory.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#copyTo-long-com.yahoo.memory.WritableMemory-long-long-">copyTo</a></span>(long&nbsp;srcOffsetBytes,
<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;destination,
long&nbsp;dstOffsetBytes,
long&nbsp;lengthBytes)</code>
<div class="block">Copies bytes from a source range of this Memory to a destination range of the given Memory
using the same low-level system copy function as found in
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/System.html?is-external=true#arraycopy-java.lang.Object-int-java.lang.Object-int-int-" title="class or interface in java.lang"><code>System.arraycopy(Object, int, Object, int, int)</code></a>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#duplicate--">duplicate</a></span>()</code>
<div class="block">Returns a read only duplicate view of this Memory.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getBoolean-long-">getBoolean</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the boolean value at the given offset</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getBooleanArray-long-boolean:A-int-int-">getBooleanArray</a></span>(long&nbsp;offsetBytes,
boolean[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</code>
<div class="block">Gets the boolean array at the given offset</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>abstract byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getByte-long-">getByte</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the byte value at the given offset</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getByteArray-long-byte:A-int-int-">getByteArray</a></span>(long&nbsp;offsetBytes,
byte[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</code>
<div class="block">Gets the byte array at the given offset</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>abstract long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getCapacity--">getCapacity</a></span>()</code>
<div class="block">Gets the capacity of this Memory in bytes</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>abstract char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getChar-long-">getChar</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the char value at the given offset</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getCharArray-long-char:A-int-int-">getCharArray</a></span>(long&nbsp;offsetBytes,
char[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</code>
<div class="block">Gets the char array at the given offset</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>abstract long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getCumulativeOffset-long-">getCumulativeOffset</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Returns the cumulative offset in bytes of this Memory including the given offsetBytes.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getCurrentDirectMemoryAllocated--">getCurrentDirectMemoryAllocated</a></span>()</code>
<div class="block">Gets the current size of active direct memory allocated.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getCurrentDirectMemoryAllocations--">getCurrentDirectMemoryAllocations</a></span>()</code>
<div class="block">Gets the current number of active direct memory allocations.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>abstract double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getDouble-long-">getDouble</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the double value at the given offset</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getDoubleArray-long-double:A-int-int-">getDoubleArray</a></span>(long&nbsp;offsetBytes,
double[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</code>
<div class="block">Gets the double array at the given offset</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>abstract float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getFloat-long-">getFloat</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the float value at the given offset</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getFloatArray-long-float:A-int-int-">getFloatArray</a></span>(long&nbsp;offsetBytes,
float[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</code>
<div class="block">Gets the float array at the given offset</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getInt-long-">getInt</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the int value at the given offset</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getIntArray-long-int:A-int-int-">getIntArray</a></span>(long&nbsp;offsetBytes,
int[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</code>
<div class="block">Gets the int array at the given offset</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>abstract long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getLong-long-">getLong</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the long value at the given offset</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getLongArray-long-long:A-int-int-">getLongArray</a></span>(long&nbsp;offsetBytes,
long[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</code>
<div class="block">Gets the long array at the given offset</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>abstract <a href="http://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/Memory.html#getResourceOrder--">getResourceOrder</a></span>()</code>
<div class="block">Returns the ByteOrder for the backing resource.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>abstract short</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getShort-long-">getShort</a></span>(long&nbsp;offsetBytes)</code>
<div class="block">Gets the short value at the given offset</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getShortArray-long-short:A-int-int-">getShortArray</a></span>(long&nbsp;offsetBytes,
short[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</code>
<div class="block">Gets the short array at the given offset</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#hasArray--">hasArray</a></span>()</code>
<div class="block">Returns true if this Memory is backed by an on-heap primitive array</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#hasByteBuffer--">hasByteBuffer</a></span>()</code>
<div class="block">Returns true if this Memory is backed by a ByteBuffer</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#isDirect--">isDirect</a></span>()</code>
<div class="block">Returns true if the backing memory is direct (off-heap) memory.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#isResourceReadOnly--">isResourceReadOnly</a></span>()</code>
<div class="block">Returns true if the backing resource is read only</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#isValid--">isValid</a></span>()</code>
<div class="block">Returns true if this Memory is valid() and has not been closed.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/MemoryMapHandler.html" title="class in com.yahoo.memory">MemoryMapHandler</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#map-java.io.File-">map</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
<div class="block">Allocates direct memory used to memory map entire files for read operations
(including those &gt; 2GB).</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/MemoryMapHandler.html" title="class in com.yahoo.memory">MemoryMapHandler</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#map-java.io.File-long-long-java.nio.ByteOrder-">map</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
long&nbsp;fileOffset,
long&nbsp;capacity,
<a href="http://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a>&nbsp;byteOrder)</code>
<div class="block">Allocates direct memory used to memory map files for read operations
(including those &gt; 2GB).</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#region-long-long-">region</a></span>(long&nbsp;offsetBytes,
long&nbsp;capacityBytes)</code>
<div class="block">Returns a read only region of this Memory.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#swapBytes--">swapBytes</a></span>()</code>
<div class="block">Return true if bytes need to be swapped based on resource ByteOrder.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>abstract <a href="http://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/Memory.html#toHexString-java.lang.String-long-int-">toHexString</a></span>(<a href="http://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 Memory.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-boolean:A-">wrap</a></span>(boolean[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for read operations</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-byte:A-">wrap</a></span>(byte[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for read operations</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-java.nio.ByteBuffer-">wrap</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;byteBuf)</code>
<div class="block">Accesses the given ByteBuffer for read-only operations.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-char:A-">wrap</a></span>(char[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for read operations</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-double:A-">wrap</a></span>(double[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for read operations</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-float:A-">wrap</a></span>(float[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for read operations</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-int:A-">wrap</a></span>(int[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for read operations</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-long:A-">wrap</a></span>(long[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for read operations</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#wrap-short:A-">wrap</a></span>(short[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for read operations</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="http://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="http://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="http://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>, <a href="http://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="http://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="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://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="http://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="http://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="http://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="http://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="http://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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Memory--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Memory</h4>
<pre>public&nbsp;Memory()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="wrap-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(<a href="http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;byteBuf)</pre>
<div class="block">Accesses the given ByteBuffer for read-only operations.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>byteBuf</code> - the given ByteBuffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the given ByteBuffer for read-only operations.</dd>
</dl>
</li>
</ul>
<a name="map-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>map</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/MemoryMapHandler.html" title="class in com.yahoo.memory">MemoryMapHandler</a>&nbsp;map(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Allocates direct memory used to memory map entire files for read operations
(including those &gt; 2GB). This assumes that the file was written using native byte ordering.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>file</code> - the given file to map</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>MemoryMapHandler for managing this map</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - file not found or RuntimeException, etc.</dd>
</dl>
</li>
</ul>
<a name="map-java.io.File-long-long-java.nio.ByteOrder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>map</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/MemoryMapHandler.html" title="class in com.yahoo.memory">MemoryMapHandler</a>&nbsp;map(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file,
long&nbsp;fileOffset,
long&nbsp;capacity,
<a href="http://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a>&nbsp;byteOrder)
throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Allocates direct memory used to memory map files for read operations
(including those &gt; 2GB).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>file</code> - the given file to map</dd>
<dd><code>fileOffset</code> - the position in the given file</dd>
<dd><code>capacity</code> - the size of the allocated direct memory</dd>
<dd><code>byteOrder</code> - the endianness of the given file.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>MemoryMapHandler for managing this map</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - file not found or RuntimeException, etc.</dd>
</dl>
</li>
</ul>
<a name="duplicate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>duplicate</h4>
<pre>public abstract&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;duplicate()</pre>
<div class="block">Returns a read only duplicate view of this Memory.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read only duplicate view of this Memory</dd>
</dl>
</li>
</ul>
<a name="region-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>region</h4>
<pre>public abstract&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;region(long&nbsp;offsetBytes,
long&nbsp;capacityBytes)</pre>
<div class="block">Returns a read only region of this Memory.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - the starting offset with respect to this Memory</dd>
<dd><code>capacityBytes</code> - the capacity of the region in bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a read only region of this Memory</dd>
</dl>
</li>
</ul>
<a name="asBuffer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asBuffer</h4>
<pre>public abstract&nbsp;<a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory">Buffer</a>&nbsp;asBuffer()</pre>
<div class="block">Convert this Memory to a Buffer</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Buffer</dd>
</dl>
</li>
</ul>
<a name="wrap-boolean:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(boolean[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for read operations</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - the given primitive array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Memory for read operations</dd>
</dl>
</li>
</ul>
<a name="wrap-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(byte[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for read operations</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - the given primitive array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Memory for read operations</dd>
</dl>
</li>
</ul>
<a name="wrap-char:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(char[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for read operations</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - the given primitive array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Memory for read operations</dd>
</dl>
</li>
</ul>
<a name="wrap-short:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(short[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for read operations</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - the given primitive array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Memory for read operations</dd>
</dl>
</li>
</ul>
<a name="wrap-int:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(int[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for read operations</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - the given primitive array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Memory for read operations</dd>
</dl>
</li>
</ul>
<a name="wrap-long:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(long[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for read operations</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - the given primitive array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Memory for read operations</dd>
</dl>
</li>
</ul>
<a name="wrap-float:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(float[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for read operations</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - the given primitive array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Memory for read operations</dd>
</dl>
</li>
</ul>
<a name="wrap-double:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;wrap(double[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for read operations</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - the given primitive array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Memory for read operations</dd>
</dl>
</li>
</ul>
<a name="getBoolean-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBoolean</h4>
<pre>public abstract&nbsp;boolean&nbsp;getBoolean(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the boolean value at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the boolean at the given offset</dd>
</dl>
</li>
</ul>
<a name="getBooleanArray-long-boolean:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBooleanArray</h4>
<pre>public abstract&nbsp;void&nbsp;getBooleanArray(long&nbsp;offsetBytes,
boolean[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</pre>
<div class="block">Gets the boolean array at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dd><code>dstArray</code> - The preallocated destination array.</dd>
<dd><code>dstOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="getByte-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByte</h4>
<pre>public abstract&nbsp;byte&nbsp;getByte(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the byte value at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the byte at the given offset</dd>
</dl>
</li>
</ul>
<a name="getByteArray-long-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteArray</h4>
<pre>public abstract&nbsp;void&nbsp;getByteArray(long&nbsp;offsetBytes,
byte[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</pre>
<div class="block">Gets the byte array at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dd><code>dstArray</code> - The preallocated destination array.</dd>
<dd><code>dstOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="getChar-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChar</h4>
<pre>public abstract&nbsp;char&nbsp;getChar(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the char value at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the char at the given offset</dd>
</dl>
</li>
</ul>
<a name="getCharArray-long-char:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCharArray</h4>
<pre>public abstract&nbsp;void&nbsp;getCharArray(long&nbsp;offsetBytes,
char[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</pre>
<div class="block">Gets the char array at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dd><code>dstArray</code> - The preallocated destination array.</dd>
<dd><code>dstOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="getDouble-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDouble</h4>
<pre>public abstract&nbsp;double&nbsp;getDouble(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the double value at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the double at the given offset</dd>
</dl>
</li>
</ul>
<a name="getDoubleArray-long-double:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDoubleArray</h4>
<pre>public abstract&nbsp;void&nbsp;getDoubleArray(long&nbsp;offsetBytes,
double[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</pre>
<div class="block">Gets the double array at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dd><code>dstArray</code> - The preallocated destination array.</dd>
<dd><code>dstOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="getFloat-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFloat</h4>
<pre>public abstract&nbsp;float&nbsp;getFloat(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the float value at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the float at the given offset</dd>
</dl>
</li>
</ul>
<a name="getFloatArray-long-float:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFloatArray</h4>
<pre>public abstract&nbsp;void&nbsp;getFloatArray(long&nbsp;offsetBytes,
float[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</pre>
<div class="block">Gets the float array at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dd><code>dstArray</code> - The preallocated destination array.</dd>
<dd><code>dstOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="getInt-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInt</h4>
<pre>public abstract&nbsp;int&nbsp;getInt(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the int value at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the int at the given offset</dd>
</dl>
</li>
</ul>
<a name="getIntArray-long-int:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIntArray</h4>
<pre>public abstract&nbsp;void&nbsp;getIntArray(long&nbsp;offsetBytes,
int[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</pre>
<div class="block">Gets the int array at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dd><code>dstArray</code> - The preallocated destination array.</dd>
<dd><code>dstOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="getLong-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLong</h4>
<pre>public abstract&nbsp;long&nbsp;getLong(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the long value at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the long at the given offset</dd>
</dl>
</li>
</ul>
<a name="getLongArray-long-long:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLongArray</h4>
<pre>public abstract&nbsp;void&nbsp;getLongArray(long&nbsp;offsetBytes,
long[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</pre>
<div class="block">Gets the long array at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dd><code>dstArray</code> - The preallocated destination array.</dd>
<dd><code>dstOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="getShort-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getShort</h4>
<pre>public abstract&nbsp;short&nbsp;getShort(long&nbsp;offsetBytes)</pre>
<div class="block">Gets the short value at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the short at the given offset</dd>
</dl>
</li>
</ul>
<a name="getShortArray-long-short:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getShortArray</h4>
<pre>public abstract&nbsp;void&nbsp;getShortArray(long&nbsp;offsetBytes,
short[]&nbsp;dstArray,
int&nbsp;dstOffset,
int&nbsp;length)</pre>
<div class="block">Gets the short array at the given offset</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory start</dd>
<dd><code>dstArray</code> - The preallocated destination array.</dd>
<dd><code>dstOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="compareTo-long-long-com.yahoo.memory.Memory-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre>public abstract&nbsp;int&nbsp;compareTo(long&nbsp;thisOffsetBytes,
long&nbsp;thisLengthBytes,
<a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a>&nbsp;that,
long&nbsp;thatOffsetBytes,
long&nbsp;thatLengthBytes)</pre>
<div class="block">Compares the bytes of this Memory to <i>that</i> Memory.
Returns <i>(this &lt; that) ? -1 : (this &gt; that) ? 1 : 0;</i>.
If all bytes are equal up to the shorter of the two lengths, the shorter length is considered
to be less than the other.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>thisOffsetBytes</code> - the starting offset for <i>this Memory</i></dd>
<dd><code>thisLengthBytes</code> - the length of the region to compare from <i>this Memory</i></dd>
<dd><code>that</code> - the other Memory to compare with</dd>
<dd><code>thatOffsetBytes</code> - the starting offset for <i>that Memory</i></dd>
<dd><code>thatLengthBytes</code> - the length of the region to compare from <i>that Memory</i></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><i>(this &lt; that) ? -1 : (this &gt; that) ? 1 : 0;</i></dd>
</dl>
</li>
</ul>
<a name="copyTo-long-com.yahoo.memory.WritableMemory-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyTo</h4>
<pre>public abstract&nbsp;void&nbsp;copyTo(long&nbsp;srcOffsetBytes,
<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;destination,
long&nbsp;dstOffsetBytes,
long&nbsp;lengthBytes)</pre>
<div class="block">Copies bytes from a source range of this Memory to a destination range of the given Memory
using the same low-level system copy function as found in
<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/System.html?is-external=true#arraycopy-java.lang.Object-int-java.lang.Object-int-int-" title="class or interface in java.lang"><code>System.arraycopy(Object, int, Object, int, int)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcOffsetBytes</code> - the source offset for this Memory</dd>
<dd><code>destination</code> - the destination Memory, which may not be Read-Only.</dd>
<dd><code>dstOffsetBytes</code> - the destination offset</dd>
<dd><code>lengthBytes</code> - the number of bytes to copy</dd>
</dl>
</li>
</ul>
<a name="getCapacity--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCapacity</h4>
<pre>public abstract&nbsp;long&nbsp;getCapacity()</pre>
<div class="block">Gets the capacity of this Memory in bytes</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the capacity of this Memory in bytes</dd>
</dl>
</li>
</ul>
<a name="getCumulativeOffset-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCumulativeOffset</h4>
<pre>public abstract&nbsp;long&nbsp;getCumulativeOffset(long&nbsp;offsetBytes)</pre>
<div class="block">Returns the cumulative offset in bytes of this Memory including the given offsetBytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - the given offset in bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the cumulative offset in bytes of this Memory including the given offsetBytes.</dd>
</dl>
</li>
</ul>
<a name="getResourceOrder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResourceOrder</h4>
<pre>public abstract&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/nio/ByteOrder.html?is-external=true" title="class or interface in java.nio">ByteOrder</a>&nbsp;getResourceOrder()</pre>
<div class="block">Returns the ByteOrder for the backing resource.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ByteOrder for the backing resource.</dd>
</dl>
</li>
</ul>
<a name="hasArray--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasArray</h4>
<pre>public abstract&nbsp;boolean&nbsp;hasArray()</pre>
<div class="block">Returns true if this Memory is backed by an on-heap primitive array</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this Memory is backed by an on-heap primitive array</dd>
</dl>
</li>
</ul>
<a name="hasByteBuffer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasByteBuffer</h4>
<pre>public abstract&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 abstract&nbsp;boolean&nbsp;isDirect()</pre>
<div class="block">Returns true if the backing memory is direct (off-heap) memory.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the backing memory is direct (off-heap) memory.</dd>
</dl>
</li>
</ul>
<a name="isResourceReadOnly--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isResourceReadOnly</h4>
<pre>public abstract&nbsp;boolean&nbsp;isResourceReadOnly()</pre>
<div class="block">Returns true if the backing resource is read only</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the backing resource is read only</dd>
</dl>
</li>
</ul>
<a name="isValid--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isValid</h4>
<pre>public abstract&nbsp;boolean&nbsp;isValid()</pre>
<div class="block">Returns true if this Memory is valid() and has not been closed.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this Memory is valid() and has not been closed.</dd>
</dl>
</li>
</ul>
<a name="swapBytes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>swapBytes</h4>
<pre>public abstract&nbsp;boolean&nbsp;swapBytes()</pre>
<div class="block">Return true if bytes need to be swapped based on resource ByteOrder.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if bytes need to be swapped based on resource ByteOrder.</dd>
</dl>
</li>
</ul>
<a name="toHexString-java.lang.String-long-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toHexString</h4>
<pre>public abstract&nbsp;<a href="http://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="http://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 Memory.
Used primarily for testing.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>header</code> - descriptive header</dd>
<dd><code>offsetBytes</code> - offset bytes relative to this Memory 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>
<a name="getCurrentDirectMemoryAllocations--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentDirectMemoryAllocations</h4>
<pre>public static&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="blockListLast">
<li class="blockList">
<h4>getCurrentDirectMemoryAllocated</h4>
<pre>public static&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>
</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/Memory.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><a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yahoo/memory/MemoryMapHandler.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/Memory.html" target="_top">Frames</a></li>
<li><a href="Memory.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><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2015&#x2013;2017 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p>
</body>
</html>