blob: 57925c2415a45eb948f972745ee2cb4c14beed65 [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 Apr 19 13:53:36 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WritableBuffer (com.yahoo.datasketches:memory 0.9.9-SNAPSHOT API)</title>
<meta name="date" content="2017-04-19">
<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="WritableBuffer (com.yahoo.datasketches:memory 0.9.9-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"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":6,"i28":10,"i29":10,"i30":10,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":6,"i41":6,"i42":6};
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/WritableBuffer.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/UnsafeUtil.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yahoo/memory/WritableDirectHandle.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/WritableBuffer.html" target="_top">Frames</a></li>
<li><a href="WritableBuffer.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.yahoo.memory</div>
<h2 title="Class WritableBuffer" class="title">Class WritableBuffer</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><a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory">com.yahoo.memory.Buffer</a></li>
<li>
<ul class="inheritance">
<li>com.yahoo.memory.WritableBuffer</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">WritableBuffer</span>
extends <a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory">Buffer</a></pre>
<div class="block">Provides read and write, positional primitive and primitive array access to any of the four
resources mentioned at the package level.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Roman Leventov, Lee Rhodes</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="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>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#allocate-int-">allocate</a></span>(int&nbsp;capacityBytes)</code>
<div class="block">Creates on-heap WritableBuffer with the given capacity</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#asWritableMemory--">asWritableMemory</a></span>()</code>
<div class="block">Convert this WritableBuffer to a WritableMemory</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/WritableBuffer.html#clear--">clear</a></span>()</code>
<div class="block">Clears all bytes of this Buffer from position to end to zero.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#fill-byte-">fill</a></span>(byte&nbsp;value)</code>
<div class="block">Fills this Buffer from position to end with the given byte value.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>abstract <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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#getArray--">getArray</a></span>()</code>
<div class="block">Returns the primitive backing array, otherwise null.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>abstract <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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#getByteBuffer--">getByteBuffer</a></span>()</code>
<div class="block">Returns the backing ByteBuffer if it exists, otherwise returns null.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#getEnd--">getEnd</a></span>()</code>
<div class="block">Gets the end position</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#getPosition--">getPosition</a></span>()</code>
<div class="block">Gets the current position</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#getRemaining--">getRemaining</a></span>()</code>
<div class="block">The number of elements remaining between the current position and the end position</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#getStart--">getStart</a></span>()</code>
<div class="block">Gets start position</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#hasRemaining--">hasRemaining</a></span>()</code>
<div class="block">Returns true if there are elements remaining between the current position and the end position</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>com.yahoo.memory.BaseBuffer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#incrementPosition-long-">incrementPosition</a></span>(long&nbsp;increment)</code>
<div class="block">Increments the current position by the given increment</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putBoolean-boolean-">putBoolean</a></span>(boolean&nbsp;value)</code>
<div class="block">Puts the boolean value at the current position.</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/WritableBuffer.html#putBooleanArray-boolean:A-int-int-">putBooleanArray</a></span>(boolean[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the boolean array at the current position.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putByte-byte-">putByte</a></span>(byte&nbsp;value)</code>
<div class="block">Puts the byte value at the current position.</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/WritableBuffer.html#putByteArray-byte:A-int-int-">putByteArray</a></span>(byte[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the byte array at the current position.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putChar-char-">putChar</a></span>(char&nbsp;value)</code>
<div class="block">Puts the char value at the current position.</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/WritableBuffer.html#putCharArray-char:A-int-int-">putCharArray</a></span>(char[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the char array at the current position.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putDouble-double-">putDouble</a></span>(double&nbsp;value)</code>
<div class="block">Puts the double value at the current position.</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/WritableBuffer.html#putDoubleArray-double:A-int-int-">putDoubleArray</a></span>(double[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the double array at the current position.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putFloat-float-">putFloat</a></span>(float&nbsp;value)</code>
<div class="block">Puts the float value at the current position.</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/WritableBuffer.html#putFloatArray-float:A-int-int-">putFloatArray</a></span>(float[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the float array at the current position.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putInt-int-">putInt</a></span>(int&nbsp;value)</code>
<div class="block">Puts the int value at the current position.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putIntArray-int:A-int-int-">putIntArray</a></span>(int[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the int array at the current position.</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/WritableBuffer.html#putLong-long-">putLong</a></span>(long&nbsp;value)</code>
<div class="block">Puts the long value at the current position.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putLongArray-long:A-int-int-">putLongArray</a></span>(long[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the long array at the current position.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putShort-short-">putShort</a></span>(short&nbsp;value)</code>
<div class="block">Puts the short value at the current position.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#putShortArray-short:A-int-int-">putShortArray</a></span>(short[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</code>
<div class="block">Puts the short array at the current position.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>com.yahoo.memory.BaseBuffer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#resetPosition--">resetPosition</a></span>()</code>
<div class="block">Resets the current position to the start position,
This does not modify any data.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>com.yahoo.memory.BaseBuffer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#setPosition-long-">setPosition</a></span>(long&nbsp;position)</code>
<div class="block">Sets the current position</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>com.yahoo.memory.BaseBuffer</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#setStartPositionEnd-long-long-long-">setStartPositionEnd</a></span>(long&nbsp;start,
long&nbsp;position,
long&nbsp;end)</code>
<div class="block">Sets start position, current position, and end position</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#wrap-boolean:A-">wrap</a></span>(boolean[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#wrap-byte:A-">wrap</a></span>(byte[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.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 write operations.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#wrap-char:A-">wrap</a></span>(char[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#wrap-double:A-">wrap</a></span>(double[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#wrap-float:A-">wrap</a></span>(float[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#wrap-int:A-">wrap</a></span>(int[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#wrap-long:A-">wrap</a></span>(long[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#wrap-short:A-">wrap</a></span>(short[]&nbsp;arr)</code>
<div class="block">Wraps the given primitive array for write operations</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#writableDuplicate--">writableDuplicate</a></span>()</code>
<div class="block">Returns a writable duplicate view of this Buffer with the same but independent values of
start, position, end and capacity.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#writableRegion--">writableRegion</a></span>()</code>
<div class="block">Returns a writable region of this WritableBuffer</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>abstract <a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/yahoo/memory/WritableBuffer.html#writableRegion-long-long-">writableRegion</a></span>(long&nbsp;offsetBytes,
long&nbsp;capacityBytes)</code>
<div class="block">Returns a writable region of this WritableBuffer</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.com.yahoo.memory.Buffer">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;com.yahoo.memory.<a href="../../../com/yahoo/memory/Buffer.html" title="class in com.yahoo.memory">Buffer</a></h3>
<code><a href="../../../com/yahoo/memory/Buffer.html#asMemory--">asMemory</a>, <a href="../../../com/yahoo/memory/Buffer.html#compareTo-long-long-com.yahoo.memory.Buffer-long-long-">compareTo</a>, <a href="../../../com/yahoo/memory/Buffer.html#duplicate--">duplicate</a>, <a href="../../../com/yahoo/memory/Buffer.html#getBoolean--">getBoolean</a>, <a href="../../../com/yahoo/memory/Buffer.html#getBooleanArray-boolean:A-int-int-">getBooleanArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#getByte--">getByte</a>, <a href="../../../com/yahoo/memory/Buffer.html#getByteArray-byte:A-int-int-">getByteArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#getCapacity--">getCapacity</a>, <a href="../../../com/yahoo/memory/Buffer.html#getChar--">getChar</a>, <a href="../../../com/yahoo/memory/Buffer.html#getCharArray-char:A-int-int-">getCharArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#getCumulativeOffset--">getCumulativeOffset</a>, <a href="../../../com/yahoo/memory/Buffer.html#getDouble--">getDouble</a>, <a href="../../../com/yahoo/memory/Buffer.html#getDoubleArray-double:A-int-int-">getDoubleArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#getFloat--">getFloat</a>, <a href="../../../com/yahoo/memory/Buffer.html#getFloatArray-float:A-int-int-">getFloatArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#getInt--">getInt</a>, <a href="../../../com/yahoo/memory/Buffer.html#getIntArray-int:A-int-int-">getIntArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#getLong--">getLong</a>, <a href="../../../com/yahoo/memory/Buffer.html#getLongArray-long:A-int-int-">getLongArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#getResourceOrder--">getResourceOrder</a>, <a href="../../../com/yahoo/memory/Buffer.html#getShort--">getShort</a>, <a href="../../../com/yahoo/memory/Buffer.html#getShortArray-short:A-int-int-">getShortArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#hasArray--">hasArray</a>, <a href="../../../com/yahoo/memory/Buffer.html#hasByteBuffer--">hasByteBuffer</a>, <a href="../../../com/yahoo/memory/Buffer.html#isDirect--">isDirect</a>, <a href="../../../com/yahoo/memory/Buffer.html#isResourceReadOnly--">isResourceReadOnly</a>, <a href="../../../com/yahoo/memory/Buffer.html#isValid--">isValid</a>, <a href="../../../com/yahoo/memory/Buffer.html#region--">region</a>, <a href="../../../com/yahoo/memory/Buffer.html#swapBytes--">swapBytes</a>, <a href="../../../com/yahoo/memory/Buffer.html#toHexString-java.lang.String-long-int-">toHexString</a></code></li>
</ul>
<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">
<!-- ============ 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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</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 write 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 write operations.</dd>
</dl>
</li>
</ul>
<a name="writableDuplicate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writableDuplicate</h4>
<pre>public abstract&nbsp;<a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;writableDuplicate()</pre>
<div class="block">Returns a writable duplicate view of this Buffer with the same but independent values of
start, position, end and capacity.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a writable duplicate view of this Buffer with the same but independent values of
start, position, end and capacity.</dd>
</dl>
</li>
</ul>
<a name="writableRegion--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writableRegion</h4>
<pre>public abstract&nbsp;<a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;writableRegion()</pre>
<div class="block">Returns a writable region of this WritableBuffer</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a writable region of this WritableBuffer</dd>
</dl>
</li>
</ul>
<a name="writableRegion-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writableRegion</h4>
<pre>public abstract&nbsp;<a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;writableRegion(long&nbsp;offsetBytes,
long&nbsp;capacityBytes)</pre>
<div class="block">Returns a writable region of this WritableBuffer</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offsetBytes</code> - the starting offset with respect to this WritableBuffer</dd>
<dd><code>capacityBytes</code> - the capacity of the region in bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a writable region of this WritableBuffer</dd>
</dl>
</li>
</ul>
<a name="asWritableMemory--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asWritableMemory</h4>
<pre>public abstract&nbsp;<a href="../../../com/yahoo/memory/WritableMemory.html" title="class in com.yahoo.memory">WritableMemory</a>&nbsp;asWritableMemory()</pre>
<div class="block">Convert this WritableBuffer to a WritableMemory</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>WritableMemory</dd>
</dl>
</li>
</ul>
<a name="allocate-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocate</h4>
<pre>public static&nbsp;<a href="../../../com/yahoo/memory/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;allocate(int&nbsp;capacityBytes)</pre>
<div class="block">Creates on-heap WritableBuffer with the given capacity</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>capacityBytes</code> - the given capacity in bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>WritableBuffer for write operations</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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;wrap(boolean[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for write 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>WritableBuffer for write 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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;wrap(byte[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for write 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>WritableBuffer for write 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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;wrap(char[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for write 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>WritableBuffer for write 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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;wrap(short[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for write 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>WritableBuffer for write 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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;wrap(int[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for write 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>WritableBuffer for write 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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;wrap(long[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for write 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>WritableBuffer for write 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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;wrap(float[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for write 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>WritableBuffer for write 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/WritableBuffer.html" title="class in com.yahoo.memory">WritableBuffer</a>&nbsp;wrap(double[]&nbsp;arr)</pre>
<div class="block">Wraps the given primitive array for write 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>WritableBuffer for write operations</dd>
</dl>
</li>
</ul>
<a name="putBoolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putBoolean</h4>
<pre>public abstract&nbsp;void&nbsp;putBoolean(boolean&nbsp;value)</pre>
<div class="block">Puts the boolean value at the current position. Increments the position by <i>Boolean.BYTES</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to put</dd>
</dl>
</li>
</ul>
<a name="putBooleanArray-boolean:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putBooleanArray</h4>
<pre>public abstract&nbsp;void&nbsp;putBooleanArray(boolean[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</pre>
<div class="block">Puts the boolean array at the current position. Increments the position by
<i>Boolean.BYTES * (length - dstOffset)</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcArray</code> - The source array.</dd>
<dd><code>srcOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="putByte-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putByte</h4>
<pre>public abstract&nbsp;void&nbsp;putByte(byte&nbsp;value)</pre>
<div class="block">Puts the byte value at the current position. Increments the position by <i>Byte.BYTES</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to put</dd>
</dl>
</li>
</ul>
<a name="putByteArray-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putByteArray</h4>
<pre>public abstract&nbsp;void&nbsp;putByteArray(byte[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</pre>
<div class="block">Puts the byte array at the current position. Increments the position by
<i>Byte.BYTES * (length - dstOffset)</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcArray</code> - The source array.</dd>
<dd><code>srcOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="putChar-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putChar</h4>
<pre>public abstract&nbsp;void&nbsp;putChar(char&nbsp;value)</pre>
<div class="block">Puts the char value at the current position. Increments the position by <i>Char.BYTES</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to put</dd>
</dl>
</li>
</ul>
<a name="putCharArray-char:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putCharArray</h4>
<pre>public abstract&nbsp;void&nbsp;putCharArray(char[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</pre>
<div class="block">Puts the char array at the current position. Increments the position by
<i>Char.BYTES * (length - dstOffset)</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcArray</code> - The source array.</dd>
<dd><code>srcOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="putDouble-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putDouble</h4>
<pre>public abstract&nbsp;void&nbsp;putDouble(double&nbsp;value)</pre>
<div class="block">Puts the double value at the current position. Increments the position by <i>Double.BYTES</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to put</dd>
</dl>
</li>
</ul>
<a name="putDoubleArray-double:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putDoubleArray</h4>
<pre>public abstract&nbsp;void&nbsp;putDoubleArray(double[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</pre>
<div class="block">Puts the double array at the current position. Increments the position by
<i>Double.BYTES * (length - dstOffset)</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcArray</code> - The source array.</dd>
<dd><code>srcOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="putFloat-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putFloat</h4>
<pre>public abstract&nbsp;void&nbsp;putFloat(float&nbsp;value)</pre>
<div class="block">Puts the float value at the current position. Increments the position by <i>Float.BYTES</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to put</dd>
</dl>
</li>
</ul>
<a name="putFloatArray-float:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putFloatArray</h4>
<pre>public abstract&nbsp;void&nbsp;putFloatArray(float[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</pre>
<div class="block">Puts the float array at the current position. Increments the position by
<i>Float.BYTES * (length - dstOffset)</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcArray</code> - The source array.</dd>
<dd><code>srcOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="putInt-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putInt</h4>
<pre>public abstract&nbsp;void&nbsp;putInt(int&nbsp;value)</pre>
<div class="block">Puts the int value at the current position. Increments the position by <i>Int.BYTES</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to put</dd>
</dl>
</li>
</ul>
<a name="putIntArray-int:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putIntArray</h4>
<pre>public abstract&nbsp;void&nbsp;putIntArray(int[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</pre>
<div class="block">Puts the int array at the current position. Increments the position by
<i>Int.BYTES * (length - dstOffset)</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcArray</code> - The source array.</dd>
<dd><code>srcOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="putLong-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putLong</h4>
<pre>public abstract&nbsp;void&nbsp;putLong(long&nbsp;value)</pre>
<div class="block">Puts the long value at the current position. Increments the position by <i>Long.BYTES</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to put</dd>
</dl>
</li>
</ul>
<a name="putLongArray-long:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putLongArray</h4>
<pre>public abstract&nbsp;void&nbsp;putLongArray(long[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</pre>
<div class="block">Puts the long array at the current position. Increments the position by
<i>Long.BYTES * (length - dstOffset)</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcArray</code> - The source array.</dd>
<dd><code>srcOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="putShort-short-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putShort</h4>
<pre>public abstract&nbsp;void&nbsp;putShort(short&nbsp;value)</pre>
<div class="block">Puts the short value at the current position. Increments the position by <i>Short.BYTES</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to put</dd>
</dl>
</li>
</ul>
<a name="putShortArray-short:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putShortArray</h4>
<pre>public abstract&nbsp;void&nbsp;putShortArray(short[]&nbsp;srcArray,
int&nbsp;srcOffset,
int&nbsp;length)</pre>
<div class="block">Puts the short array at the current position. Increments the position by
<i>Short.BYTES * (length - dstOffset)</i>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcArray</code> - The source array.</dd>
<dd><code>srcOffset</code> - offset in array units</dd>
<dd><code>length</code> - number of array units to transfer</dd>
</dl>
</li>
</ul>
<a name="getArray--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getArray</h4>
<pre>public abstract&nbsp;<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>&nbsp;getArray()</pre>
<div class="block">Returns the primitive backing array, otherwise null.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the primitive backing array, otherwise null.</dd>
</dl>
</li>
</ul>
<a name="getByteBuffer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByteBuffer</h4>
<pre>public abstract&nbsp;<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;getByteBuffer()</pre>
<div class="block">Returns the backing ByteBuffer if it exists, otherwise returns null.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the backing ByteBuffer if it exists, otherwise returns null.</dd>
</dl>
</li>
</ul>
<a name="clear--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public abstract&nbsp;void&nbsp;clear()</pre>
<div class="block">Clears all bytes of this Buffer from position to end to zero. The position will be set to end.</div>
</li>
</ul>
<a name="fill-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fill</h4>
<pre>public abstract&nbsp;void&nbsp;fill(byte&nbsp;value)</pre>
<div class="block">Fills this Buffer from position to end with the given byte value. The position will be set to end.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the given byte value</dd>
</dl>
</li>
</ul>
<a name="setStartPositionEnd-long-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStartPositionEnd</h4>
<pre>public&nbsp;com.yahoo.memory.BaseBuffer&nbsp;setStartPositionEnd(long&nbsp;start,
long&nbsp;position,
long&nbsp;end)</pre>
<div class="block">Sets start position, current position, and end position</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>start</code> - the start position in the buffer</dd>
<dd><code>position</code> - the current position between the start and end</dd>
<dd><code>end</code> - the end position in the buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="getStart--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStart</h4>
<pre>public&nbsp;long&nbsp;getStart()</pre>
<div class="block">Gets start position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>start position</dd>
</dl>
</li>
</ul>
<a name="getPosition--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPosition</h4>
<pre>public&nbsp;long&nbsp;getPosition()</pre>
<div class="block">Gets the current position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current position</dd>
</dl>
</li>
</ul>
<a name="getEnd--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEnd</h4>
<pre>public&nbsp;long&nbsp;getEnd()</pre>
<div class="block">Gets the end position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the end position</dd>
</dl>
</li>
</ul>
<a name="setPosition-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPosition</h4>
<pre>public&nbsp;com.yahoo.memory.BaseBuffer&nbsp;setPosition(long&nbsp;position)</pre>
<div class="block">Sets the current position</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - the given current position</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="incrementPosition-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>incrementPosition</h4>
<pre>public&nbsp;com.yahoo.memory.BaseBuffer&nbsp;incrementPosition(long&nbsp;increment)</pre>
<div class="block">Increments the current position by the given increment</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>increment</code> - the given increment</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="resetPosition--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetPosition</h4>
<pre>public&nbsp;com.yahoo.memory.BaseBuffer&nbsp;resetPosition()</pre>
<div class="block">Resets the current position to the start position,
This does not modify any data.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BaseBuffer</dd>
</dl>
</li>
</ul>
<a name="getRemaining--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemaining</h4>
<pre>public&nbsp;long&nbsp;getRemaining()</pre>
<div class="block">The number of elements remaining between the current position and the end position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>(end - position)</code></dd>
</dl>
</li>
</ul>
<a name="hasRemaining--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hasRemaining</h4>
<pre>public&nbsp;boolean&nbsp;hasRemaining()</pre>
<div class="block">Returns true if there are elements remaining between the current position and the end position</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>(end - position) &gt; 0</code></dd>
</dl>
</li>
</ul>
</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/WritableBuffer.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/UnsafeUtil.html" title="class in com.yahoo.memory"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/yahoo/memory/WritableDirectHandle.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/WritableBuffer.html" target="_top">Frames</a></li>
<li><a href="WritableBuffer.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2015&#x2013;2017 <a href="https://www.yahoo.com">Yahoo! Inc.</a>. All rights reserved.</small></p>
</body>
</html>