blob: 4ac9c3e61b4a8b9ece6405971331c6bd954bd8a6 [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 Fri Sep 01 12:13:05 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UnsafeUtil (com.yahoo.datasketches:memory 0.10.4-SNAPSHOT API)</title>
<meta name="date" content="2017-09-01">
<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="UnsafeUtil (com.yahoo.datasketches:memory 0.10.4-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/UnsafeUtil.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/ReadOnlyException.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yahoo/memory/WritableBuffer.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/UnsafeUtil.html" target="_top">Frames</a></li>
<li><a href="UnsafeUtil.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><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.yahoo.memory</div>
<h2 title="Class UnsafeUtil" class="title">Class UnsafeUtil</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.UnsafeUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">UnsafeUtil</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 access to the sun.misc.Unsafe class and its key static fields.
<p>The internal static initializer also detects whether the methods unique to the Unsafe class in
JDK8 are present; if not, methods that are compatible with JDK7 are substituted using an internal
interface. In order for this to work, this library still needs to be compiled using jdk8
and it must be done with both source and target versions of jdk7 specified in pom.xml.
The resultant jar will work on jdk7 and jdk8.</p></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">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ADDRESS_SIZE">ADDRESS_SIZE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_BOOLEAN_BASE_OFFSET">ARRAY_BOOLEAN_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_BOOLEAN_INDEX_SCALE">ARRAY_BOOLEAN_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_BYTE_BASE_OFFSET">ARRAY_BYTE_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_BYTE_INDEX_SCALE">ARRAY_BYTE_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_CHAR_BASE_OFFSET">ARRAY_CHAR_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_CHAR_INDEX_SCALE">ARRAY_CHAR_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_DOUBLE_BASE_OFFSET">ARRAY_DOUBLE_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_DOUBLE_INDEX_SCALE">ARRAY_DOUBLE_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_FLOAT_BASE_OFFSET">ARRAY_FLOAT_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_FLOAT_INDEX_SCALE">ARRAY_FLOAT_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_INT_BASE_OFFSET">ARRAY_INT_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_INT_INDEX_SCALE">ARRAY_INT_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_LONG_BASE_OFFSET">ARRAY_LONG_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_LONG_INDEX_SCALE">ARRAY_LONG_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_OBJECT_BASE_OFFSET">ARRAY_OBJECT_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_OBJECT_INDEX_SCALE">ARRAY_OBJECT_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_SHORT_BASE_OFFSET">ARRAY_SHORT_BASE_OFFSET</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#ARRAY_SHORT_INDEX_SCALE">ARRAY_SHORT_INDEX_SCALE</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#BOOLEAN_SHIFT">BOOLEAN_SHIFT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#BYTE_SHIFT">BYTE_SHIFT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#CHAR_SHIFT">CHAR_SHIFT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#DOUBLE_SHIFT">DOUBLE_SHIFT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#FLOAT_SHIFT">FLOAT_SHIFT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#INT_SHIFT">INT_SHIFT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#JDK">JDK</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#LONG_SHIFT">LONG_SHIFT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <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/UnsafeUtil.html#LS">LS</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#SHORT_SHIFT">SHORT_SHIFT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static sun.misc.Unsafe</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#unsafe">unsafe</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#UNSAFE_COPY_THRESHOLD">UNSAFE_COPY_THRESHOLD</a></span></code>
<div class="block">Large memory copies are broken into segments of bytes of this size to allow for safepoint
polling by the JVM.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" 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="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>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#assertBounds-long-long-long-">assertBounds</a></span>(long&nbsp;reqOff,
long&nbsp;reqLen,
long&nbsp;allocSize)</code>
<div class="block">Perform bounds checking using java assert (if enabled) checking the requested offset and length
against the allocated size.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#checkBounds-long-long-long-">checkBounds</a></span>(long&nbsp;reqOff,
long&nbsp;reqLen,
long&nbsp;allocSize)</code>
<div class="block">Check the requested offset and length against the allocated size.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/UnsafeUtil.html#checkOverlap-long-long-long-">checkOverlap</a></span>(long&nbsp;srcOff,
long&nbsp;dstOff,
long&nbsp;length)</code>
<div class="block">Return true if the given offsets and length do not overlap.</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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="unsafe">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unsafe</h4>
<pre>public static final&nbsp;sun.misc.Unsafe unsafe</pre>
</li>
</ul>
<a name="JDK">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>JDK</h4>
<pre>public static final&nbsp;int JDK</pre>
</li>
</ul>
<a name="ADDRESS_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ADDRESS_SIZE</h4>
<pre>public static final&nbsp;int ADDRESS_SIZE</pre>
</li>
</ul>
<a name="ARRAY_BOOLEAN_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_BOOLEAN_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_BOOLEAN_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_BYTE_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_BYTE_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_BYTE_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_SHORT_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_SHORT_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_SHORT_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_CHAR_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_CHAR_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_CHAR_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_INT_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_INT_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_INT_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_LONG_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_LONG_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_LONG_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_FLOAT_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_FLOAT_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_FLOAT_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_DOUBLE_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_DOUBLE_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_DOUBLE_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_OBJECT_BASE_OFFSET">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_OBJECT_BASE_OFFSET</h4>
<pre>public static final&nbsp;int ARRAY_OBJECT_BASE_OFFSET</pre>
</li>
</ul>
<a name="ARRAY_BOOLEAN_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_BOOLEAN_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_BOOLEAN_INDEX_SCALE</pre>
</li>
</ul>
<a name="ARRAY_BYTE_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_BYTE_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_BYTE_INDEX_SCALE</pre>
</li>
</ul>
<a name="ARRAY_SHORT_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_SHORT_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_SHORT_INDEX_SCALE</pre>
</li>
</ul>
<a name="ARRAY_CHAR_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_CHAR_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_CHAR_INDEX_SCALE</pre>
</li>
</ul>
<a name="ARRAY_INT_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_INT_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_INT_INDEX_SCALE</pre>
</li>
</ul>
<a name="ARRAY_LONG_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_LONG_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_LONG_INDEX_SCALE</pre>
</li>
</ul>
<a name="ARRAY_FLOAT_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_FLOAT_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_FLOAT_INDEX_SCALE</pre>
</li>
</ul>
<a name="ARRAY_DOUBLE_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_DOUBLE_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_DOUBLE_INDEX_SCALE</pre>
</li>
</ul>
<a name="ARRAY_OBJECT_INDEX_SCALE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ARRAY_OBJECT_INDEX_SCALE</h4>
<pre>public static final&nbsp;int ARRAY_OBJECT_INDEX_SCALE</pre>
</li>
</ul>
<a name="BOOLEAN_SHIFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BOOLEAN_SHIFT</h4>
<pre>public static final&nbsp;int BOOLEAN_SHIFT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.BOOLEAN_SHIFT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="BYTE_SHIFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BYTE_SHIFT</h4>
<pre>public static final&nbsp;int BYTE_SHIFT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.BYTE_SHIFT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SHORT_SHIFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SHORT_SHIFT</h4>
<pre>public static final&nbsp;int SHORT_SHIFT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.SHORT_SHIFT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CHAR_SHIFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CHAR_SHIFT</h4>
<pre>public static final&nbsp;int CHAR_SHIFT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.CHAR_SHIFT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="INT_SHIFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INT_SHIFT</h4>
<pre>public static final&nbsp;int INT_SHIFT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.INT_SHIFT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LONG_SHIFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LONG_SHIFT</h4>
<pre>public static final&nbsp;int LONG_SHIFT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.LONG_SHIFT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FLOAT_SHIFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLOAT_SHIFT</h4>
<pre>public static final&nbsp;int FLOAT_SHIFT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.FLOAT_SHIFT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DOUBLE_SHIFT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DOUBLE_SHIFT</h4>
<pre>public static final&nbsp;int DOUBLE_SHIFT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.DOUBLE_SHIFT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="LS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LS</h4>
<pre>public static final&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> LS</pre>
</li>
</ul>
<a name="UNSAFE_COPY_THRESHOLD">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>UNSAFE_COPY_THRESHOLD</h4>
<pre>public static final&nbsp;long UNSAFE_COPY_THRESHOLD</pre>
<div class="block">Large memory copies are broken into segments of bytes of this size to allow for safepoint
polling by the JVM.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#com.yahoo.memory.UnsafeUtil.UNSAFE_COPY_THRESHOLD">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="assertBounds-long-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertBounds</h4>
<pre>public static&nbsp;void&nbsp;assertBounds(long&nbsp;reqOff,
long&nbsp;reqLen,
long&nbsp;allocSize)</pre>
<div class="block">Perform bounds checking using java assert (if enabled) checking the requested offset and length
against the allocated size.
If reqOff + reqLen &gt; allocSize or any of the parameters are negative an exception will
be thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reqOff</code> - the requested offset</dd>
<dd><code>reqLen</code> - the requested length</dd>
<dd><code>allocSize</code> - the allocated size.</dd>
</dl>
</li>
</ul>
<a name="checkBounds-long-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkBounds</h4>
<pre>public static&nbsp;void&nbsp;checkBounds(long&nbsp;reqOff,
long&nbsp;reqLen,
long&nbsp;allocSize)</pre>
<div class="block">Check the requested offset and length against the allocated size.
If reqOff + reqLen &gt; allocSize or any of the parameters are negative an exception will
be thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reqOff</code> - the requested offset</dd>
<dd><code>reqLen</code> - the requested length</dd>
<dd><code>allocSize</code> - the allocated size.</dd>
</dl>
</li>
</ul>
<a name="checkOverlap-long-long-long-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>checkOverlap</h4>
<pre>public static&nbsp;boolean&nbsp;checkOverlap(long&nbsp;srcOff,
long&nbsp;dstOff,
long&nbsp;length)</pre>
<div class="block">Return true if the given offsets and length do not overlap.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcOff</code> - the start of the source region</dd>
<dd><code>dstOff</code> - the start of the destination region</dd>
<dd><code>length</code> - the length of both regions</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given offsets and length do not overlap.</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/UnsafeUtil.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/ReadOnlyException.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yahoo/memory/WritableBuffer.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/UnsafeUtil.html" target="_top">Frames</a></li>
<li><a href="UnsafeUtil.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><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2015&#x2013;2017 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p>
</body>
</html>