| <!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 Sun Mar 26 22:21:05 PDT 2017 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Memory (com.yahoo.datasketches:memory 0.10.0 API)</title> |
| <meta name="date" content="2017-03-26"> |
| <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.10.0 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":6,"i13":6,"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":9,"i28":9,"i29":6,"i30":6,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":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 Class</span></a></li> |
| <li><a href="../../../com/yahoo/memory/MemoryMapHandler.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next 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 Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== 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 at the package level.</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"> |
| <!-- ======== 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"> </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> </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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></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 thisOffsetBytes, |
| long thisLengthBytes, |
| <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> that, |
| long thatOffsetBytes, |
| long 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 srcOffsetBytes, |
| <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> destination, |
| long dstOffsetBytes, |
| long 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 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 offsetBytes, |
| boolean[] dstArray, |
| int dstOffset, |
| int 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 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 offsetBytes, |
| byte[] dstArray, |
| int dstOffset, |
| int 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 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 offsetBytes, |
| char[] dstArray, |
| int dstOffset, |
| int 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 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>abstract double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/Memory.html#getDouble-long-">getDouble</a></span>(long offsetBytes)</code> |
| <div class="block">Gets the double value at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i13" 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 offsetBytes, |
| double[] dstArray, |
| int dstOffset, |
| int length)</code> |
| <div class="block">Gets the double array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i14" 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 offsetBytes)</code> |
| <div class="block">Gets the float 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#getFloatArray-long-float:A-int-int-">getFloatArray</a></span>(long offsetBytes, |
| float[] dstArray, |
| int dstOffset, |
| int length)</code> |
| <div class="block">Gets the float array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i16" 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 offsetBytes)</code> |
| <div class="block">Gets the int 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#getIntArray-long-int:A-int-int-">getIntArray</a></span>(long offsetBytes, |
| int[] dstArray, |
| int dstOffset, |
| int length)</code> |
| <div class="block">Gets the int array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i18" 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 offsetBytes)</code> |
| <div class="block">Gets the long 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#getLongArray-long-long:A-int-int-">getLongArray</a></span>(long offsetBytes, |
| long[] dstArray, |
| int dstOffset, |
| int length)</code> |
| <div class="block">Gets the long array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <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 offsetBytes)</code> |
| <div class="block">Gets the short 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#getShortArray-long-short:A-int-int-">getShortArray</a></span>(long offsetBytes, |
| short[] dstArray, |
| int dstOffset, |
| int length)</code> |
| <div class="block">Gets the short array at the given offset</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <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="i23" class="rowColor"> |
| <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="i24" class="altColor"> |
| <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="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#isResourceReadOnly--">isResourceReadOnly</a></span>()</code> |
| <div class="block">Returns true if the backing resource is read only</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#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="i27" 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-">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> file)</code> |
| <div class="block">Allocates direct memory used to memory map files for read operations |
| (including those > 2GB).</div> |
| </td> |
| </tr> |
| <tr id="i28" 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-long-long-">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> file, |
| long fileOffset, |
| long capacity)</code> |
| <div class="block">Allocates direct memory used to memory map files for read operations |
| (including those > 2GB).</div> |
| </td> |
| </tr> |
| <tr id="i29" 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#region-long-long-">region</a></span>(long offsetBytes, |
| long capacityBytes)</code> |
| <div class="block">Returns a read only region of this Memory.</div> |
| </td> |
| </tr> |
| <tr id="i30" 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> header, |
| long offsetBytes, |
| int lengthBytes)</code> |
| <div class="block">Returns a formatted hex string of a range of this Memory.</div> |
| </td> |
| </tr> |
| <tr id="i31" 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[] arr)</code> |
| <div class="block">Wraps the given primitive array for read operations</div> |
| </td> |
| </tr> |
| <tr id="i32" 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[] arr)</code> |
| <div class="block">Wraps the given primitive array for read operations</div> |
| </td> |
| </tr> |
| <tr id="i33" 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> byteBuf)</code> |
| <div class="block">Accesses the given ByteBuffer for read-only operations.</div> |
| </td> |
| </tr> |
| <tr id="i34" 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[] arr)</code> |
| <div class="block">Wraps the given primitive array for read operations</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-double:A-">wrap</a></span>(double[] 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-float:A-">wrap</a></span>(float[] 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-int:A-">wrap</a></span>(int[] arr)</code> |
| <div class="block">Wraps the given primitive array for read 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-long:A-">wrap</a></span>(long[] 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-short:A-">wrap</a></span>(short[] 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 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 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> 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> 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 <a href="../../../com/yahoo/memory/MemoryMapHandler.html" title="class in com.yahoo.memory">MemoryMapHandler</a> 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> 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 files for read operations |
| (including those > 2GB).</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-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>map</h4> |
| <pre>public static <a href="../../../com/yahoo/memory/MemoryMapHandler.html" title="class in com.yahoo.memory">MemoryMapHandler</a> 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> file, |
| long fileOffset, |
| long capacity) |
| 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 > 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> |
| <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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> region(long offsetBytes, |
| long 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 <a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory">Buffer</a> 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> wrap(boolean[] 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> wrap(byte[] 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> wrap(char[] 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> wrap(short[] 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> wrap(int[] 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> wrap(long[] 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> wrap(float[] 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 <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> wrap(double[] 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 boolean getBoolean(long 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 void getBooleanArray(long offsetBytes, |
| boolean[] dstArray, |
| int dstOffset, |
| int 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 byte getByte(long 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 void getByteArray(long offsetBytes, |
| byte[] dstArray, |
| int dstOffset, |
| int 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 char getChar(long 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 void getCharArray(long offsetBytes, |
| char[] dstArray, |
| int dstOffset, |
| int 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 double getDouble(long 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 void getDoubleArray(long offsetBytes, |
| double[] dstArray, |
| int dstOffset, |
| int 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 float getFloat(long 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 void getFloatArray(long offsetBytes, |
| float[] dstArray, |
| int dstOffset, |
| int 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 int getInt(long 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 void getIntArray(long offsetBytes, |
| int[] dstArray, |
| int dstOffset, |
| int 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 long getLong(long 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 void getLongArray(long offsetBytes, |
| long[] dstArray, |
| int dstOffset, |
| int 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 short getShort(long 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 void getShortArray(long offsetBytes, |
| short[] dstArray, |
| int dstOffset, |
| int 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 int compareTo(long thisOffsetBytes, |
| long thisLengthBytes, |
| <a href="../../../com/yahoo/memory/Memory.html" title="class in com.yahoo.memory">Memory</a> that, |
| long thatOffsetBytes, |
| long thatLengthBytes)</pre> |
| <div class="block">Compares the bytes of this Memory to <i>that</i> Memory. |
| Returns <i>(this < that) ? -1 : (this > 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 < that) ? -1 : (this > 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 void copyTo(long srcOffsetBytes, |
| <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a> destination, |
| long dstOffsetBytes, |
| long 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 destintaion 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 long 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 long getCumulativeOffset(long 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="hasArray--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasArray</h4> |
| <pre>public abstract boolean 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 boolean 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 boolean 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 boolean 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 boolean 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="toHexString-java.lang.String-long-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toHexString</h4> |
| <pre>public 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> 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> header, |
| long offsetBytes, |
| int 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> |
| </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 Class</span></a></li> |
| <li><a href="../../../com/yahoo/memory/MemoryMapHandler.html" title="class in com.yahoo.memory"><span class="typeNameLink">Next 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 Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2015–2017 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p> |
| </body> |
| </html> |