blob: d4980200f63b31ba31ca51789107e8e24b93c351 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ProtonBuffer (Qpid ProtonJ2 Parent 1.0.0-M9 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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="ProtonBuffer (Qpid ProtonJ2 Parent 1.0.0-M9 API)";
}
}
catch(err) {
}
//-->
var data = {"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":6,"i28":6,"i29":6,"i30":6,"i31":6,"i32":6,"i33":6,"i34":6,"i35":6,"i36":6,"i37":6,"i38":6,"i39":6,"i40":6,"i41":6,"i42":6,"i43":6,"i44":6,"i45":6,"i46":6,"i47":6,"i48":6,"i49":6,"i50":6,"i51":6,"i52":6,"i53":6,"i54":6,"i55":6,"i56":6,"i57":6,"i58":6,"i59":6,"i60":6,"i61":6,"i62":6,"i63":6,"i64":6,"i65":6,"i66":6,"i67":6,"i68":6,"i69":6,"i70":6,"i71":6,"i72":6,"i73":6,"i74":6,"i75":6,"i76":6,"i77":6,"i78":6,"i79":18,"i80":6,"i81":6,"i82":6,"i83":6,"i84":6,"i85":6,"i86":6,"i87":6,"i88":6,"i89":6,"i90":6,"i91":6,"i92":6,"i93":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ProtonBuffer.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="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.qpid.protonj2.buffer</a></div>
<h2 title="Interface ProtonBuffer" class="title">Interface ProtonBuffer</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a>&lt;<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&gt;</code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="ProtonAbstractBuffer.html" title="class in org.apache.qpid.protonj2.buffer">ProtonAbstractBuffer</a></code>, <code><a href="ProtonByteBuffer.html" title="class in org.apache.qpid.protonj2.buffer">ProtonByteBuffer</a></code>, <code><a href="ProtonCompositeBuffer.html" title="class in org.apache.qpid.protonj2.buffer">ProtonCompositeBuffer</a></code>, <code><a href="ProtonDuplicatedBuffer.html" title="class in org.apache.qpid.protonj2.buffer">ProtonDuplicatedBuffer</a></code>, <code><a href="ProtonNettyByteBuffer.html" title="class in org.apache.qpid.protonj2.buffer">ProtonNettyByteBuffer</a></code>, <code><a href="ProtonNioByteBuffer.html" title="class in org.apache.qpid.protonj2.buffer">ProtonNioByteBuffer</a></code>, <code><a href="ProtonSlicedBuffer.html" title="class in org.apache.qpid.protonj2.buffer">ProtonSlicedBuffer</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">ProtonBuffer</span>
extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a>&lt;<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&gt;</pre>
<div class="block">Buffer type abstraction used to provide users of the proton library with
a means of using their own type of byte buffer types in combination with the
library tooling.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</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="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#capacity()">capacity</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#capacity(int)">capacity</a></span>&#8203;(int&nbsp;newCapacity)</code></th>
<td class="colLast">
<div class="block">Adjusts the capacity of this buffer.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clear()">clear</a></span>()</code></th>
<td class="colLast">
<div class="block">Reset the read and write offsets to zero and clears the position markers if
set previously, this method is not required to reset the data previously
written to this buffer.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compareTo(org.apache.qpid.protonj2.buffer.ProtonBuffer)">compareTo</a></span>&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;buffer)</code></th>
<td class="colLast">
<div class="block">Compares the remaining content of the current buffer with the remaining content of the
given buffer, which must not be null.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#copy()">copy</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a deep copy of the readable bytes of this ProtonBuffer, the returned buffer can
be modified without affecting the contents or position markers of this instance.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#copy(int,int)">copy</a></span>&#8203;(int&nbsp;index,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Returns a copy of this buffer's sub-region.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#duplicate()">duplicate</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a duplicate of this ProtonBuffer instance that shares the same backing
data store and but maintains separate position index values.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureWritable(int)">ensureWritable</a></span>&#8203;(int&nbsp;amount)</code></th>
<td class="colLast">
<div class="block">Ensures that the requested number of bytes is available for write operations
in the current buffer, growing the buffer if needed to meet the requested
writable capacity.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getArray()">getArray</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the backing array for this ProtonBuffer instance if there is such an array or
throws an exception if this ProtonBuffer implementation has no backing array.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getArrayOffset()">getArrayOffset</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBoolean(int)">getBoolean</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a boolean from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getByte(int)">getByte</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a byte from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytes(int,byte%5B%5D)">getBytes</a></span>&#8203;(int&nbsp;index,
byte[]&nbsp;destination)</code></th>
<td class="colLast">
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code>.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytes(int,byte%5B%5D,int,int)">getBytes</a></span>&#8203;(int&nbsp;index,
byte[]&nbsp;destination,
int&nbsp;offset,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code>.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytes(int,java.nio.ByteBuffer)">getBytes</a></span>&#8203;(int&nbsp;index,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;destination)</code></th>
<td class="colLast">
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code> until the destination's position
reaches its limit.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer)">getBytes</a></span>&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;destination)</code></th>
<td class="colLast">
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code> until the destination becomes
non-writable.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int)">getBytes</a></span>&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;destination,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code>.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)">getBytes</a></span>&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;destination,
int&nbsp;offset,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code>.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>char</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getChar(int)">getChar</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a 2-byte char from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDouble(int)">getDouble</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a double from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFloat(int)">getFloat</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a float from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInt(int)">getInt</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a int from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLong(int)">getLong</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a long from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxWritableBytes()">getMaxWritableBytes</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the current maximum number of bytes that can be written to this buffer.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReadableBytes()">getReadableBytes</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReadIndex()">getReadIndex</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>short</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getShort(int)">getShort</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a short from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>short</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUnsignedByte(int)">getUnsignedByte</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a unsigned byte from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUnsignedInt(int)">getUnsignedInt</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a unsigned int from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUnsignedShort(int)">getUnsignedShort</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Gets a unsigned short from the specified index, this method will not modify the read or write
index.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWritableBytes()">getWritableBytes</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWriteIndex()">getWriteIndex</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasArray()">hasArray</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isReadable()">isReadable</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isReadable(int)">isReadable</a></span>&#8203;(int&nbsp;size)</code></th>
<td class="colLast">
<div class="block">Check if the given number of bytes can be read from the buffer.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isWritable()">isWritable</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isWritable(int)">isWritable</a></span>&#8203;(int&nbsp;size)</code></th>
<td class="colLast">
<div class="block">Check if the requested number of bytes can be written into this buffer.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#markReadIndex()">markReadIndex</a></span>()</code></th>
<td class="colLast">
<div class="block">Marks the current read index so that it can later be restored by a call to
<a href="#resetReadIndex()"><code>resetReadIndex()</code></a>, the initial mark value is 0.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#markWriteIndex()">markWriteIndex</a></span>()</code></th>
<td class="colLast">
<div class="block">Marks the current write index so that it can later be restored by a call to
<a href="#resetWriteIndex()"><code>resetWriteIndex()</code></a>, the initial mark value is 0.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxCapacity()">maxCapacity</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of bytes that this buffer is allowed to grow to when write
operations exceed the current capacity value.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBoolean()">readBoolean</a></span>()</code></th>
<td class="colLast">
<div class="block">Reads a boolean value from the buffer and advances the read index by one.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readByte()">readByte</a></span>()</code></th>
<td class="colLast">
<div class="block">Reads one byte from the buffer and advances the read index by one.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(byte%5B%5D)">readBytes</a></span>&#8203;(byte[]&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Reads bytes from this buffer and writes them into the destination byte array incrementing
the read index by the value of the length of the destination array.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(byte%5B%5D,int)">readBytes</a></span>&#8203;(byte[]&nbsp;target,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Reads bytes from this buffer and writes them into the destination byte array incrementing
the read index by the length value passed.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(byte%5B%5D,int,int)">readBytes</a></span>&#8203;(byte[]&nbsp;target,
int&nbsp;offset,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Reads bytes from this buffer and writes them into the destination byte array incrementing
the read index by the length value passed, the bytes are read into the given buffer starting
from the given offset value.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(java.nio.ByteBuffer)">readBytes</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;destination)</code></th>
<td class="colLast">
<div class="block">Transfers this buffer's data to the specified destination starting at
the current <code>readIndex</code> until the destination's position
reaches its limit, and increases the <code>readIndex</code> by the
number of the transferred bytes.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer)">readBytes</a></span>&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Reads bytes from this buffer and writes them into the destination ProtonBuffer incrementing
the read index by the value of the number of bytes written to the target.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int)">readBytes</a></span>&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;target,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Reads bytes from this buffer and writes them into the destination ProtonBuffer incrementing
the read index by the number of bytes written.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)">readBytes</a></span>&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;target,
int&nbsp;offset,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers this buffer's data to the specified destination starting at
the current <code>readIndex</code> and increases the <code>readIndex</code>
by the number of the transferred bytes (= <code>length</code>).</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readDouble()">readDouble</a></span>()</code></th>
<td class="colLast">
<div class="block">Reads a double value from the buffer and advances the read index by eight.</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readFloat()">readFloat</a></span>()</code></th>
<td class="colLast">
<div class="block">Reads a float value from the buffer and advances the read index by four.</div>
</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readInt()">readInt</a></span>()</code></th>
<td class="colLast">
<div class="block">Reads a integer value from the buffer and advances the read index by four.</div>
</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readLong()">readLong</a></span>()</code></th>
<td class="colLast">
<div class="block">Reads a long value from the buffer and advances the read index by eight.</div>
</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code>short</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readShort()">readShort</a></span>()</code></th>
<td class="colLast">
<div class="block">Reads a short value from the buffer and advances the read index by two.</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetReadIndex()">resetReadIndex</a></span>()</code></th>
<td class="colLast">
<div class="block">Resets the current read index to the previously marked value.</div>
</td>
</tr>
<tr id="i55" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetWriteIndex()">resetWriteIndex</a></span>()</code></th>
<td class="colLast">
<div class="block">Resets the current write index to the previously marked value.</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBoolean(int,boolean)">setBoolean</a></span>&#8203;(int&nbsp;index,
boolean&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the boolean value at the given write index in this buffer's backing data store.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setByte(int,int)">setByte</a></span>&#8203;(int&nbsp;index,
int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the byte value at the given write index in this buffer's backing data store.</div>
</td>
</tr>
<tr id="i58" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBytes(int,byte%5B%5D)">setBytes</a></span>&#8203;(int&nbsp;index,
byte[]&nbsp;source)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source array's data to this buffer starting at
the specified absolute <code>index</code>.</div>
</td>
</tr>
<tr id="i59" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBytes(int,byte%5B%5D,int,int)">setBytes</a></span>&#8203;(int&nbsp;index,
byte[]&nbsp;source,
int&nbsp;offset,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source array's data to this buffer starting at
the specified absolute <code>index</code>.</div>
</td>
</tr>
<tr id="i60" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBytes(int,java.nio.ByteBuffer)">setBytes</a></span>&#8203;(int&nbsp;index,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;source)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the specified absolute <code>index</code> until the source buffer's position
reaches its limit.</div>
</td>
</tr>
<tr id="i61" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer)">setBytes</a></span>&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the specified absolute <code>index</code> until the source buffer becomes
unreadable.</div>
</td>
</tr>
<tr id="i62" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int)">setBytes</a></span>&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the specified absolute <code>index</code>.</div>
</td>
</tr>
<tr id="i63" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)">setBytes</a></span>&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source,
int&nbsp;offset,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the specified absolute <code>index</code>.</div>
</td>
</tr>
<tr id="i64" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setChar(int,int)">setChar</a></span>&#8203;(int&nbsp;index,
int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the char value at the given write index in this buffer's backing data store.</div>
</td>
</tr>
<tr id="i65" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDouble(int,double)">setDouble</a></span>&#8203;(int&nbsp;index,
double&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the double value at the given write index in this buffer's backing data store.</div>
</td>
</tr>
<tr id="i66" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setFloat(int,float)">setFloat</a></span>&#8203;(int&nbsp;index,
float&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the float value at the given write index in this buffer's backing data store.</div>
</td>
</tr>
<tr id="i67" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setIndex(int,int)">setIndex</a></span>&#8203;(int&nbsp;readIndex,
int&nbsp;writeIndex)</code></th>
<td class="colLast">
<div class="block">Used to set the read index and the write index in one call.</div>
</td>
</tr>
<tr id="i68" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setInt(int,int)">setInt</a></span>&#8203;(int&nbsp;index,
int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the int value at the given write index in this buffer's backing data store.</div>
</td>
</tr>
<tr id="i69" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setLong(int,long)">setLong</a></span>&#8203;(int&nbsp;index,
long&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the long value at the given write index in this buffer's backing data store.</div>
</td>
</tr>
<tr id="i70" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setReadIndex(int)">setReadIndex</a></span>&#8203;(int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the read index for this buffer.</div>
</td>
</tr>
<tr id="i71" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setShort(int,int)">setShort</a></span>&#8203;(int&nbsp;index,
int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the short value at the given write index in this buffer's backing data store.</div>
</td>
</tr>
<tr id="i72" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setWriteIndex(int)">setWriteIndex</a></span>&#8203;(int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the write index for this buffer.</div>
</td>
</tr>
<tr id="i73" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#skipBytes(int)">skipBytes</a></span>&#8203;(int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Increases the current <code>readIndex</code> of this buffer by the specified <code>length</code>.</div>
</td>
</tr>
<tr id="i74" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#slice()">slice</a></span>()</code></th>
<td class="colLast">
<div class="block">Create a new ProtonBuffer whose contents are a subsequence of the contents of this
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a>.</div>
</td>
</tr>
<tr id="i75" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#slice(int,int)">slice</a></span>&#8203;(int&nbsp;index,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Create a new ProtonBuffer whose contents are a subsequence of the contents of this
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a>.</div>
</td>
</tr>
<tr id="i76" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toByteBuffer()">toByteBuffer</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a ByteBuffer that represents the readable bytes contained in this buffer.</div>
</td>
</tr>
<tr id="i77" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toByteBuffer(int,int)">toByteBuffer</a></span>&#8203;(int&nbsp;index,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Returns a ByteBuffer that represents the given span of bytes from the readable portion
of this buffer.</div>
</td>
</tr>
<tr id="i78" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString(java.nio.charset.Charset)">toString</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink">Charset</a>&nbsp;charset)</code></th>
<td class="colLast">
<div class="block">Returns a String created from the buffer's underlying bytes using the specified
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink"><code>Charset</code></a> for the newly created String.</div>
</td>
</tr>
<tr id="i79" class="rowColor">
<td class="colFirst"><code>default <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unwrap()">unwrap</a></span>()</code></th>
<td class="colLast">
<div class="block">Return the underlying buffer object that backs this <a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> instance, or null
if there is no backing object.</div>
</td>
</tr>
<tr id="i80" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBoolean(boolean)">writeBoolean</a></span>&#8203;(boolean&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes a single boolean to the buffer and advances the write index by one.</div>
</td>
</tr>
<tr id="i81" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeByte(int)">writeByte</a></span>&#8203;(int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes a single byte to the buffer and advances the write index by one.</div>
</td>
</tr>
<tr id="i82" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBytes(byte%5B%5D)">writeBytes</a></span>&#8203;(byte[]&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes the contents of the given byte array into the buffer and advances the write index by the
length of the given array.</div>
</td>
</tr>
<tr id="i83" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBytes(byte%5B%5D,int)">writeBytes</a></span>&#8203;(byte[]&nbsp;value,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Writes the contents of the given byte array into the buffer and advances the write index by the
length value given.</div>
</td>
</tr>
<tr id="i84" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBytes(byte%5B%5D,int,int)">writeBytes</a></span>&#8203;(byte[]&nbsp;value,
int&nbsp;offset,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Writes the contents of the given byte array into the buffer and advances the write index by the
length value given.</div>
</td>
</tr>
<tr id="i85" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBytes(java.nio.ByteBuffer)">writeBytes</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;source)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the current <code>writeIndex</code> until the source buffer's position
reaches its limit, and increases the <code>writeIndex</code> by the
number of the transferred bytes.</div>
</td>
</tr>
<tr id="i86" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer)">writeBytes</a></span>&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the current <code>writeIndex</code> until the source buffer becomes
unreadable, and increases the <code>writeIndex</code> by the number of
the transferred bytes.</div>
</td>
</tr>
<tr id="i87" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int)">writeBytes</a></span>&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the current <code>writeIndex</code> and increases the <code>writeIndex</code>
by the number of the transferred bytes (= <code>length</code>).</div>
</td>
</tr>
<tr id="i88" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)">writeBytes</a></span>&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source,
int&nbsp;offset,
int&nbsp;length)</code></th>
<td class="colLast">
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the current <code>writeIndex</code> and increases the <code>writeIndex</code>
by the number of the transferred bytes (= <code>length</code>).</div>
</td>
</tr>
<tr id="i89" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeDouble(double)">writeDouble</a></span>&#8203;(double&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes a single double to the buffer and advances the write index by eight.</div>
</td>
</tr>
<tr id="i90" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeFloat(float)">writeFloat</a></span>&#8203;(float&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes a single float to the buffer and advances the write index by four.</div>
</td>
</tr>
<tr id="i91" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeInt(int)">writeInt</a></span>&#8203;(int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes a single integer to the buffer and advances the write index by four.</div>
</td>
</tr>
<tr id="i92" class="altColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeLong(long)">writeLong</a></span>&#8203;(long&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes a single long to the buffer and advances the write index by eight.</div>
</td>
</tr>
<tr id="i93" class="rowColor">
<td class="colFirst"><code><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeShort(short)">writeShort</a></span>&#8203;(short&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Writes a single short to the buffer and advances the write index by two.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="unwrap()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unwrap</h4>
<pre class="methodSignature">default&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;unwrap()</pre>
<div class="block">Return the underlying buffer object that backs this <a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> instance, or null
if there is no backing object.
This method should be overridden in buffer abstraction when access to the underlying backing
store is needed such as when wrapping pooled resources that need explicit release calls.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an underlying buffer object or other backing store for this buffer.</dd>
</dl>
</li>
</ul>
<a id="hasArray()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasArray</h4>
<pre class="methodSignature">boolean&nbsp;hasArray()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this buffer has a backing byte array that can be accessed.</dd>
</dl>
</li>
</ul>
<a id="getArray()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getArray</h4>
<pre class="methodSignature">byte[]&nbsp;getArray()</pre>
<div class="block">Returns the backing array for this ProtonBuffer instance if there is such an array or
throws an exception if this ProtonBuffer implementation has no backing array.
<p>
Changes to the returned array are visible to other users of this ProtonBuffer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the backing byte array for this ProtonBuffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if this buffer type has no backing array.</dd>
</dl>
</li>
</ul>
<a id="getArrayOffset()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getArrayOffset</h4>
<pre class="methodSignature">int&nbsp;getArrayOffset()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the offset of the first byte in the backing array belonging to this buffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if this buffer type has no backing array.</dd>
</dl>
</li>
</ul>
<a id="capacity()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>capacity</h4>
<pre class="methodSignature">int&nbsp;capacity()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes this buffer can currently contain.</dd>
</dl>
</li>
</ul>
<a id="capacity(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>capacity</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;capacity&#8203;(int&nbsp;newCapacity)</pre>
<div class="block">Adjusts the capacity of this buffer. If the new capacity is less than the current
capacity, the content of this buffer is truncated. If the new capacity is greater
than the current capacity, the buffer is appended with unspecified data whose length is
new capacity - current capacity.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>newCapacity</code> - the new maximum capacity value of this buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for using in call chaining.</dd>
</dl>
</li>
</ul>
<a id="maxCapacity()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxCapacity</h4>
<pre class="methodSignature">int&nbsp;maxCapacity()</pre>
<div class="block">Returns the number of bytes that this buffer is allowed to grow to when write
operations exceed the current capacity value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes this buffer is allowed to grow to.</dd>
</dl>
</li>
</ul>
<a id="ensureWritable(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureWritable</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;ensureWritable&#8203;(int&nbsp;amount)
throws <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a>,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the requested number of bytes is available for write operations
in the current buffer, growing the buffer if needed to meet the requested
writable capacity. This method will not alter the write offset but may change
the value returned from the capacity method if new buffer space is allocated.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>amount</code> - The number of bytes beyond the current write index needed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for using in call chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the amount given is less than zero.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the amount given would result in the buffer
exceeding the maximum capacity for this buffer.</dd>
</dl>
</li>
</ul>
<a id="duplicate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>duplicate</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;duplicate()</pre>
<div class="block">Create a duplicate of this ProtonBuffer instance that shares the same backing
data store and but maintains separate position index values. Changes to one buffer
are visible in any of its duplicates. This method does not copy the read or write
markers to the new buffer instance.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new ProtonBuffer instance that shares the backing data as this one.</dd>
</dl>
</li>
</ul>
<a id="slice()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>slice</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;slice()</pre>
<div class="block">Create a new ProtonBuffer whose contents are a subsequence of the contents of this
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a>.
<p>
The starting point of the new buffer starts at this buffer's current position, the
marks and limits of the new buffer will be independent of this buffer however changes
to the data backing the buffer will be visible in this buffer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new <a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> whose contents are a subsequence of this buffer.</dd>
</dl>
</li>
</ul>
<a id="slice(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>slice</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;slice&#8203;(int&nbsp;index,
int&nbsp;length)</pre>
<div class="block">Create a new ProtonBuffer whose contents are a subsequence of the contents of this
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a>.
<p>
The starting point of the new buffer starts at given index into this buffer and spans
the number of bytes given by the length. Changes to the contents of this buffer or to
the produced slice buffer are visible in the other.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index in this buffer where the slice should begin.</dd>
<dd><code>length</code> - The number of bytes to make visible to the new buffer from this one.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new <a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> whose contents are a subsequence of this buffer.</dd>
</dl>
</li>
</ul>
<a id="copy()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;copy()</pre>
<div class="block">Create a deep copy of the readable bytes of this ProtonBuffer, the returned buffer can
be modified without affecting the contents or position markers of this instance.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a deep copy of this ProtonBuffer instance.</dd>
</dl>
</li>
</ul>
<a id="copy(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;copy&#8203;(int&nbsp;index,
int&nbsp;length)</pre>
<div class="block">Returns a copy of this buffer's sub-region. Modifying the content of
the returned buffer or this buffer does not affect each other at all.
This method does not modify the value returned from <a href="#getReadIndex()"><code>getReadIndex()</code></a>
or <a href="#getWriteIndex()"><code>getWriteIndex()</code></a> of this buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index in this buffer where the copy should begin</dd>
<dd><code>length</code> - The number of bytes to copy to the new buffer from this one.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new ProtonBuffer instance containing the copied bytes.</dd>
</dl>
</li>
</ul>
<a id="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;clear()</pre>
<div class="block">Reset the read and write offsets to zero and clears the position markers if
set previously, this method is not required to reset the data previously
written to this buffer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for using in call chaining.</dd>
</dl>
</li>
</ul>
<a id="toByteBuffer()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteBuffer</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;toByteBuffer()</pre>
<div class="block">Returns a ByteBuffer that represents the readable bytes contained in this buffer.
<p>
This method should attempt to return a ByteBuffer that shares the backing data store
with this buffer however if that is not possible it is permitted that the returned
ByteBuffer contain a copy of the readable bytes of this ProtonBuffer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a ByteBuffer that represents the readable bytes of this buffer.</dd>
</dl>
</li>
</ul>
<a id="toByteBuffer(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteBuffer</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;toByteBuffer&#8203;(int&nbsp;index,
int&nbsp;length)</pre>
<div class="block">Returns a ByteBuffer that represents the given span of bytes from the readable portion
of this buffer.
<p>
This method should attempt to return a ByteBuffer that shares the backing data store
with this buffer however if that is not possible it is permitted that the returned
ByteBuffer contain a copy of the readable bytes of this ProtonBuffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The starting index in this where the ByteBuffer view should begin.</dd>
<dd><code>length</code> - The number of bytes to include in the ByteBuffer view.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a ByteBuffer that represents the given view of this buffers readable bytes.</dd>
</dl>
</li>
</ul>
<a id="toString(java.nio.charset.Charset)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;toString&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink">Charset</a>&nbsp;charset)</pre>
<div class="block">Returns a String created from the buffer's underlying bytes using the specified
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink"><code>Charset</code></a> for the newly created String.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>charset</code> - the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink"><code>Charset</code></a> to use to construct the new string.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string created from the buffer's underlying bytes using the given <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset" class="externalLink"><code>Charset</code></a>.</dd>
</dl>
</li>
</ul>
<a id="getReadableBytes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadableBytes</h4>
<pre class="methodSignature">int&nbsp;getReadableBytes()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes available for reading from this buffer.</dd>
</dl>
</li>
</ul>
<a id="getWritableBytes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWritableBytes</h4>
<pre class="methodSignature">int&nbsp;getWritableBytes()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes that can be written to this buffer before the limit is hit.</dd>
</dl>
</li>
</ul>
<a id="getMaxWritableBytes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxWritableBytes</h4>
<pre class="methodSignature">int&nbsp;getMaxWritableBytes()</pre>
<div class="block">Gets the current maximum number of bytes that can be written to this buffer. This is
the same value that can be computed by subtracting the current write index from the
maximum buffer capacity.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the maximum number of bytes that can be written to this buffer before the limit is hit.</dd>
</dl>
</li>
</ul>
<a id="getReadIndex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadIndex</h4>
<pre class="methodSignature">int&nbsp;getReadIndex()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current value of the read index for this buffer.</dd>
</dl>
</li>
</ul>
<a id="setReadIndex(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReadIndex</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setReadIndex&#8203;(int&nbsp;value)</pre>
<div class="block">Sets the read index for this buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The index into the buffer where the read index should be positioned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for use in chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the value given is greater than the write index or negative.</dd>
</dl>
</li>
</ul>
<a id="getWriteIndex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWriteIndex</h4>
<pre class="methodSignature">int&nbsp;getWriteIndex()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current value of the write index for this buffer.</dd>
</dl>
</li>
</ul>
<a id="setWriteIndex(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setWriteIndex</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setWriteIndex&#8203;(int&nbsp;value)</pre>
<div class="block">Sets the write index for this buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The index into the buffer where the write index should be positioned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for use in chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the value less than the read index or greater than the capacity.</dd>
</dl>
</li>
</ul>
<a id="setIndex(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIndex</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setIndex&#8203;(int&nbsp;readIndex,
int&nbsp;writeIndex)</pre>
<div class="block">Used to set the read index and the write index in one call. This methods allows for an update
to the read index and write index to values that could not be set using simple setReadIndex and
setWriteIndex call where the values would violate the constraints placed on them by the value
of the other index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>readIndex</code> - The new read index to assign to this buffer.</dd>
<dd><code>writeIndex</code> - The new write index to assign to this buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for use in chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the values violate the basic tenants of readIndex and writeIndex</dd>
</dl>
</li>
</ul>
<a id="markReadIndex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>markReadIndex</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;markReadIndex()</pre>
<div class="block">Marks the current read index so that it can later be restored by a call to
<a href="#resetReadIndex()"><code>resetReadIndex()</code></a>, the initial mark value is 0.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for use in chaining.</dd>
</dl>
</li>
</ul>
<a id="resetReadIndex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetReadIndex</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;resetReadIndex()</pre>
<div class="block">Resets the current read index to the previously marked value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for use in chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the current write index is less than the marked read index.</dd>
</dl>
</li>
</ul>
<a id="markWriteIndex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>markWriteIndex</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;markWriteIndex()</pre>
<div class="block">Marks the current write index so that it can later be restored by a call to
<a href="#resetWriteIndex()"><code>resetWriteIndex()</code></a>, the initial mark value is 0.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for use in chaining.</dd>
</dl>
</li>
</ul>
<a id="resetWriteIndex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetWriteIndex</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;resetWriteIndex()</pre>
<div class="block">Resets the current write index to the previously marked value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for use in chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the current read index is greater than the marked write index.</dd>
</dl>
</li>
</ul>
<a id="isReadable()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReadable</h4>
<pre class="methodSignature">boolean&nbsp;isReadable()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the read index is less than the write index.</dd>
</dl>
</li>
</ul>
<a id="isReadable(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReadable</h4>
<pre class="methodSignature">boolean&nbsp;isReadable&#8203;(int&nbsp;size)</pre>
<div class="block">Check if the given number of bytes can be read from the buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>size</code> - the size that is desired in readable bytes</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the buffer has at least the given number of readable bytes remaining.</dd>
</dl>
</li>
</ul>
<a id="compareTo(org.apache.qpid.protonj2.buffer.ProtonBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre class="methodSignature">int&nbsp;compareTo&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;buffer)</pre>
<div class="block">Compares the remaining content of the current buffer with the remaining content of the
given buffer, which must not be null. Each byte is compared in turn as an unsigned value,
returning upon the first difference. If no difference is found before the end of one
buffer, the shorter buffer is considered less than the other, or else if the same length
then they are considered equal.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang" class="externalLink">compareTo</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a>&lt;<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a negative, zero, or positive integer when this buffer is less than, equal to,
or greater than the given buffer.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang" class="externalLink"><code>Comparable.compareTo(Object)</code></a></dd>
</dl>
</li>
</ul>
<a id="getBoolean(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBoolean</h4>
<pre class="methodSignature">boolean&nbsp;getBoolean&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a boolean from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getByte(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getByte</h4>
<pre class="methodSignature">byte&nbsp;getByte&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a byte from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getUnsignedByte(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnsignedByte</h4>
<pre class="methodSignature">short&nbsp;getUnsignedByte&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a unsigned byte from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getChar(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChar</h4>
<pre class="methodSignature">char&nbsp;getChar&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a 2-byte char from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getShort(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getShort</h4>
<pre class="methodSignature">short&nbsp;getShort&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a short from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getUnsignedShort(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnsignedShort</h4>
<pre class="methodSignature">int&nbsp;getUnsignedShort&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a unsigned short from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getInt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInt</h4>
<pre class="methodSignature">int&nbsp;getInt&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a int from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getUnsignedInt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnsignedInt</h4>
<pre class="methodSignature">long&nbsp;getUnsignedInt&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a unsigned int from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getLong(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLong</h4>
<pre class="methodSignature">long&nbsp;getLong&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a long from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getFloat(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFloat</h4>
<pre class="methodSignature">float&nbsp;getFloat&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a float from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getDouble(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDouble</h4>
<pre class="methodSignature">double&nbsp;getDouble&#8203;(int&nbsp;index)</pre>
<div class="block">Gets a double from the specified index, this method will not modify the read or write
index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value read from the given index.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or past the current buffer capacity.</dd>
</dl>
</li>
</ul>
<a id="getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;getBytes&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;destination)</pre>
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code> until the destination becomes
non-writable. This method is basically same with
<a href="#getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>getBytes(int, ProtonBuffer, int, int)</code></a>, except that this
method increases the <code>writeIndex</code> of the destination by the
number of the transferred bytes while
<a href="#getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>getBytes(int, ProtonBuffer, int, int)</code></a> does not.
This method does not modify <code>readIndex</code> or <code>writeIndex</code> of
the source buffer (i.e. <code>this</code>).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dd><code>destination</code> - the destination buffer for the bytes to be read</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code> or
if <code>index + dst.writableBytes</code> is greater than
<code>this.capacity</code></dd>
</dl>
</li>
</ul>
<a id="getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;getBytes&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;destination,
int&nbsp;length)</pre>
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code>. This method is basically same
with <a href="#getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>getBytes(int, ProtonBuffer, int, int)</code></a>, except that this
method increases the <code>writeIndex</code> of the destination by the
number of the transferred bytes while
<a href="#getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>getBytes(int, ProtonBuffer, int, int)</code></a> does not.
This method does not modify <code>readIndex</code> or <code>writeIndex</code> of
the source buffer (i.e. <code>this</code>).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - the index in the buffer to start the read from</dd>
<dd><code>destination</code> - the destination buffer for the bytes to be read</dd>
<dd><code>length</code> - the number of bytes to transfer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code>,
if <code>index + length</code> is greater than
<code>this.capacity</code>, or
if <code>length</code> is greater than <code>dst.writableBytes</code></dd>
</dl>
</li>
</ul>
<a id="getBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;getBytes&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;destination,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code>.
This method does not modify <code>readIndex</code> or <code>writeIndex</code>
of both the source (i.e. <code>this</code>) and the destination.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dd><code>destination</code> - The buffer where the bytes read will be written to</dd>
<dd><code>offset</code> - The offset into the destination where the write starts</dd>
<dd><code>length</code> - The number of bytes to transfer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code>,
if the specified <code>dstIndex</code> is less than <code>0</code>,
if <code>index + length</code> is greater than
<code>this.capacity</code>, or
if <code>dstIndex + length</code> is greater than
<code>dst.capacity</code></dd>
</dl>
</li>
</ul>
<a id="getBytes(int,byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;getBytes&#8203;(int&nbsp;index,
byte[]&nbsp;destination)</pre>
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code>.
This method does not modify <code>readIndex</code> or <code>writeIndex</code> of
this buffer</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dd><code>destination</code> - The buffer where the bytes read will be written to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code> or
if <code>index + dst.length</code> is greater than
<code>this.capacity</code></dd>
</dl>
</li>
</ul>
<a id="getBytes(int,byte[],int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;getBytes&#8203;(int&nbsp;index,
byte[]&nbsp;destination,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code>.
This method does not modify <code>#getReadIndex()</code> or <code>#getWriteIndex()</code>
of this buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dd><code>destination</code> - The buffer where the bytes read will be written to</dd>
<dd><code>offset</code> - the offset into the destination to begin writing the bytes.</dd>
<dd><code>length</code> - the number of bytes to transfer from this buffer to the target buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code>,
if the specified <code>offset</code> is less than <code>0</code>,
if <code>index + length</code> is greater than
<code>this.capacity</code>, or
if <code>offset + length</code> is greater than
<code>target.length</code></dd>
</dl>
</li>
</ul>
<a id="getBytes(int,java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;getBytes&#8203;(int&nbsp;index,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;destination)</pre>
<div class="block">Transfers this buffer's data to the specified destination starting at
the specified absolute <code>index</code> until the destination's position
reaches its limit.
This method does not modify <code>#getReadIndex()</code> or <code>#getWriteIndex()</code> of
this buffer while the destination's <code>position</code> will be increased.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index into the buffer where the value should be read.</dd>
<dd><code>destination</code> - The buffer where the bytes read will be written to</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code> or
if <code>index + destination.remaining()</code> is greater than
<code>#capacity()</code></dd>
</dl>
</li>
</ul>
<a id="setByte(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setByte</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setByte&#8203;(int&nbsp;index,
int&nbsp;value)</pre>
<div class="block">Sets the byte value at the given write index in this buffer's backing data store.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to start the write from.</dd>
<dd><code>value</code> - The value to write at the given index.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or the write would exceed capacity.</dd>
</dl>
</li>
</ul>
<a id="setBoolean(int,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBoolean</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setBoolean&#8203;(int&nbsp;index,
boolean&nbsp;value)</pre>
<div class="block">Sets the boolean value at the given write index in this buffer's backing data store.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to start the write from.</dd>
<dd><code>value</code> - The value to write at the given index.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or the write would exceed capacity.</dd>
</dl>
</li>
</ul>
<a id="setChar(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setChar</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setChar&#8203;(int&nbsp;index,
int&nbsp;value)</pre>
<div class="block">Sets the char value at the given write index in this buffer's backing data store.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to start the write from.</dd>
<dd><code>value</code> - The value to write at the given index.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or the write would exceed capacity.</dd>
</dl>
</li>
</ul>
<a id="setShort(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setShort</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setShort&#8203;(int&nbsp;index,
int&nbsp;value)</pre>
<div class="block">Sets the short value at the given write index in this buffer's backing data store.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to start the write from.</dd>
<dd><code>value</code> - The value to write at the given index.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or the write would exceed capacity.</dd>
</dl>
</li>
</ul>
<a id="setInt(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInt</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setInt&#8203;(int&nbsp;index,
int&nbsp;value)</pre>
<div class="block">Sets the int value at the given write index in this buffer's backing data store.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to start the write from.</dd>
<dd><code>value</code> - The value to write at the given index.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or the write would exceed capacity.</dd>
</dl>
</li>
</ul>
<a id="setLong(int,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLong</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setLong&#8203;(int&nbsp;index,
long&nbsp;value)</pre>
<div class="block">Sets the long value at the given write index in this buffer's backing data store.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to start the write from.</dd>
<dd><code>value</code> - The value to write at the given index.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or the write would exceed capacity.</dd>
</dl>
</li>
</ul>
<a id="setFloat(int,float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFloat</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setFloat&#8203;(int&nbsp;index,
float&nbsp;value)</pre>
<div class="block">Sets the float value at the given write index in this buffer's backing data store.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to start the write from.</dd>
<dd><code>value</code> - The value to write at the given index.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or the write would exceed capacity.</dd>
</dl>
</li>
</ul>
<a id="setDouble(int,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDouble</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setDouble&#8203;(int&nbsp;index,
double&nbsp;value)</pre>
<div class="block">Sets the double value at the given write index in this buffer's backing data store.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to start the write from.</dd>
<dd><code>value</code> - The value to write at the given index.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a reference to this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the index is negative or the write would exceed capacity.</dd>
</dl>
</li>
</ul>
<a id="setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setBytes&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source)</pre>
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the specified absolute <code>index</code> until the source buffer becomes
unreadable. This method is basically same with
<a href="#setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>setBytes(int, ProtonBuffer, int, int)</code></a>, except that this
method increases the <code>readIndex</code> of the source buffer by
the number of the transferred bytes while
<a href="#setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>setBytes(int, ProtonBuffer, int, int)</code></a> does not.
This method does not modify <code>readIndex</code> or <code>writeIndex</code> of
the source buffer (i.e. <code>this</code>).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index in this buffer where the write operation starts.</dd>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code> or
if <code>index + source.readableBytes</code> is greater than
<code>this.capacity</code></dd>
</dl>
</li>
</ul>
<a id="setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setBytes&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source,
int&nbsp;length)</pre>
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the specified absolute <code>index</code>. This method is basically same
with <a href="#setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>setBytes(int, ProtonBuffer, int, int)</code></a>, except that this
method increases the <code>readIndex</code> of the source buffer by
the number of the transferred bytes while
<a href="#setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>setBytes(int, ProtonBuffer, int, int)</code></a> does not.
This method does not modify <code>readIndex</code> or <code>writeIndex</code> of
the source buffer (i.e. <code>this</code>).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index in this buffer where the write operation starts.</dd>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dd><code>length</code> - The number of bytes to transfer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code>,
if <code>index + length</code> is greater than
<code>this.capacity</code>, or
if <code>length</code> is greater than <code>source.readableBytes</code></dd>
</dl>
</li>
</ul>
<a id="setBytes(int,org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setBytes&#8203;(int&nbsp;index,
<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the specified absolute <code>index</code>.
This method does not modify <code>readIndex</code> or <code>writeIndex</code>
of both the source (i.e. <code>this</code>) and the destination.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index in this buffer where the write operation starts.</dd>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dd><code>offset</code> - The offset into the source where the set begins.</dd>
<dd><code>length</code> - The number of bytes to transfer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code>,
if the specified <code>sourceIndex</code> is less than <code>0</code>,
if <code>index + length</code> is greater than
<code>this.capacity</code>, or
if <code>sourceIndex + length</code> is greater than
<code>source.capacity</code></dd>
</dl>
</li>
</ul>
<a id="setBytes(int,byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setBytes&#8203;(int&nbsp;index,
byte[]&nbsp;source)</pre>
<div class="block">Transfers the specified source array's data to this buffer starting at
the specified absolute <code>index</code>.
This method does not modify <code>readIndex</code> or <code>writeIndex</code> of
this buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index in this buffer where the write operation starts.</dd>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code> or
if <code>index + source.length</code> is greater than
<code>this.capacity</code></dd>
</dl>
</li>
</ul>
<a id="setBytes(int,byte[],int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setBytes&#8203;(int&nbsp;index,
byte[]&nbsp;source,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Transfers the specified source array's data to this buffer starting at
the specified absolute <code>index</code>.
This method does not modify <code>readIndex</code> or <code>writeIndex</code> of
this buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index in this buffer where the write operation starts.</dd>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dd><code>offset</code> - The offset into the source where the set begins.</dd>
<dd><code>length</code> - The number of bytes to transfer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code>,
if the specified <code>offset</code> is less than <code>0</code>,
if <code>index + length</code> is greater than
<code>this.capacity</code>, or
if <code>offset + length</code> is greater than <code>source.length</code></dd>
</dl>
</li>
</ul>
<a id="setBytes(int,java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;setBytes&#8203;(int&nbsp;index,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;source)</pre>
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the specified absolute <code>index</code> until the source buffer's position
reaches its limit.
This method does not modify <code>readIndex</code> or <code>writeIndex</code> of
this buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index in this buffer where the write operation starts.</dd>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>index</code> is less than <code>0</code> or
if <code>index + source.remaining()</code> is greater than
<code>this.capacity</code></dd>
</dl>
</li>
</ul>
<a id="skipBytes(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;skipBytes&#8203;(int&nbsp;length)</pre>
<div class="block">Increases the current <code>readIndex</code> of this buffer by the specified <code>length</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>length</code> - the number of bytes in this buffer to skip.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if <code>length</code> is greater than <code>this.readableBytes</code></dd>
</dl>
</li>
</ul>
<a id="readByte()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readByte</h4>
<pre class="methodSignature">byte&nbsp;readByte()</pre>
<div class="block">Reads one byte from the buffer and advances the read index by one.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a single byte from the ProtonBuffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no readable bytes left in the buffer.</dd>
</dl>
</li>
</ul>
<a id="readBytes(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;readBytes&#8203;(byte[]&nbsp;target)</pre>
<div class="block">Reads bytes from this buffer and writes them into the destination byte array incrementing
the read index by the value of the length of the destination array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - The byte array to write into.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the target array is larger than the readable bytes.</dd>
</dl>
</li>
</ul>
<a id="readBytes(byte[],int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;readBytes&#8203;(byte[]&nbsp;target,
int&nbsp;length)</pre>
<div class="block">Reads bytes from this buffer and writes them into the destination byte array incrementing
the read index by the length value passed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - The byte array to write into.</dd>
<dd><code>length</code> - The number of bytes to read into the given array.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the length is larger than the readable bytes, or length is
greater than the length of the target array, or length is negative.</dd>
</dl>
</li>
</ul>
<a id="readBytes(byte[],int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;readBytes&#8203;(byte[]&nbsp;target,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Reads bytes from this buffer and writes them into the destination byte array incrementing
the read index by the length value passed, the bytes are read into the given buffer starting
from the given offset value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - The byte array to write into.</dd>
<dd><code>offset</code> - The offset into the given array where bytes are written.</dd>
<dd><code>length</code> - The number of bytes to read into the given array.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the offset is negative, or if the length is greater than
the current readable bytes or if the offset + length is great than the size of the target.</dd>
</dl>
</li>
</ul>
<a id="readBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;readBytes&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;target)</pre>
<div class="block">Reads bytes from this buffer and writes them into the destination ProtonBuffer incrementing
the read index by the value of the number of bytes written to the target. The number of bytes
written will be the equal to the writable bytes of the target buffer. The write index of the
target buffer will be incremented by the number of bytes written into it.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - The ProtonBuffer to write into.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the target buffer is this buffer.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the target buffer has more writable bytes than this buffer
has readable bytes.</dd>
</dl>
</li>
</ul>
<a id="readBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;readBytes&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;target,
int&nbsp;length)</pre>
<div class="block">Reads bytes from this buffer and writes them into the destination ProtonBuffer incrementing
the read index by the number of bytes written. The write index of the target buffer will be
incremented by the number of bytes written into it.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - The ProtonBuffer to write into.</dd>
<dd><code>length</code> - The number of bytes to read into the given buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the length value is greater than the readable bytes of
this buffer or is greater than the writable bytes of the target buffer..</dd>
</dl>
</li>
</ul>
<a id="readBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;readBytes&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;target,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Transfers this buffer's data to the specified destination starting at
the current <code>readIndex</code> and increases the <code>readIndex</code>
by the number of the transferred bytes (= <code>length</code>). This method
does not modify the write index of the target buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - The ProtonBuffer to write into.</dd>
<dd><code>offset</code> - The offset into the given buffer where bytes are written.</dd>
<dd><code>length</code> - The number of bytes to read into the given buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the offset is negative, or if the length is greater than
the current readable bytes or if the offset + length is great than the size of the target.</dd>
</dl>
</li>
</ul>
<a id="readBytes(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;readBytes&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;destination)</pre>
<div class="block">Transfers this buffer's data to the specified destination starting at
the current <code>readIndex</code> until the destination's position
reaches its limit, and increases the <code>readIndex</code> by the
number of the transferred bytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>destination</code> - The target ByteBuffer to write into.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the destination does not have enough capacity.</dd>
</dl>
</li>
</ul>
<a id="readBoolean()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBoolean</h4>
<pre class="methodSignature">boolean&nbsp;readBoolean()</pre>
<div class="block">Reads a boolean value from the buffer and advances the read index by one.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>boolean value read from the buffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if a value cannot be read from the buffer.</dd>
</dl>
</li>
</ul>
<a id="readShort()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readShort</h4>
<pre class="methodSignature">short&nbsp;readShort()</pre>
<div class="block">Reads a short value from the buffer and advances the read index by two.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>short value read from the buffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if a value cannot be read from the buffer.</dd>
</dl>
</li>
</ul>
<a id="readInt()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readInt</h4>
<pre class="methodSignature">int&nbsp;readInt()</pre>
<div class="block">Reads a integer value from the buffer and advances the read index by four.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>integer value read from the buffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if a value cannot be read from the buffer.</dd>
</dl>
</li>
</ul>
<a id="readLong()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLong</h4>
<pre class="methodSignature">long&nbsp;readLong()</pre>
<div class="block">Reads a long value from the buffer and advances the read index by eight.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>long value read from the buffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if a value cannot be read from the buffer.</dd>
</dl>
</li>
</ul>
<a id="readFloat()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFloat</h4>
<pre class="methodSignature">float&nbsp;readFloat()</pre>
<div class="block">Reads a float value from the buffer and advances the read index by four.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>float value read from the buffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if a value cannot be read from the buffer.</dd>
</dl>
</li>
</ul>
<a id="readDouble()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readDouble</h4>
<pre class="methodSignature">double&nbsp;readDouble()</pre>
<div class="block">Reads a double value from the buffer and advances the read index by eight.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>double value read from the buffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if a value cannot be read from the buffer.</dd>
</dl>
</li>
</ul>
<a id="isWritable()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWritable</h4>
<pre class="methodSignature">boolean&nbsp;isWritable()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the buffer has bytes remaining between the write index and the capacity.</dd>
</dl>
</li>
</ul>
<a id="isWritable(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWritable</h4>
<pre class="methodSignature">boolean&nbsp;isWritable&#8203;(int&nbsp;size)</pre>
<div class="block">Check if the requested number of bytes can be written into this buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>size</code> - The number writable bytes that is being checked in this buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the buffer has space left for the given number of bytes to be written.</dd>
</dl>
</li>
</ul>
<a id="writeByte(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeByte</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeByte&#8203;(int&nbsp;value)</pre>
<div class="block">Writes a single byte to the buffer and advances the write index by one.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The byte to write into the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeBytes(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeBytes&#8203;(byte[]&nbsp;value)</pre>
<div class="block">Writes the contents of the given byte array into the buffer and advances the write index by the
length of the given array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The byte array to write into the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeBytes(byte[],int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeBytes&#8203;(byte[]&nbsp;value,
int&nbsp;length)</pre>
<div class="block">Writes the contents of the given byte array into the buffer and advances the write index by the
length value given.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The byte array to write into the buffer.</dd>
<dd><code>length</code> - The number of bytes to write from the given array into this buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeBytes(byte[],int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeBytes&#8203;(byte[]&nbsp;value,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Writes the contents of the given byte array into the buffer and advances the write index by the
length value given. The bytes written into this buffer are read starting at the given offset
into the passed in byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The byte array to write into the buffer.</dd>
<dd><code>offset</code> - The offset into the given array to start reading from.</dd>
<dd><code>length</code> - The number of bytes to write from the given array into this buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeBytes&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source)</pre>
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the current <code>writeIndex</code> until the source buffer becomes
unreadable, and increases the <code>writeIndex</code> by the number of
the transferred bytes. This method is basically same with
<a href="#writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>writeBytes(ProtonBuffer, int, int)</code></a>, except that this method
increases the <code>readIndex</code> of the source buffer by the number of
the transferred bytes while <a href="#writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>writeBytes(ProtonBuffer, int, int)</code></a>
does not.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if <code>source.readableBytes</code> is greater than
<code>this.writableBytes</code></dd>
</dl>
</li>
</ul>
<a id="writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeBytes&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source,
int&nbsp;length)</pre>
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the current <code>writeIndex</code> and increases the <code>writeIndex</code>
by the number of the transferred bytes (= <code>length</code>). This method
is basically same with <a href="#writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>writeBytes(ProtonBuffer, int, int)</code></a>,
except that this method increases the <code>readIndex</code> of the source
buffer by the number of the transferred bytes (= <code>length</code>) while
<a href="#writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)"><code>writeBytes(ProtonBuffer, int, int)</code></a> does not.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dd><code>length</code> - The number of bytes to transfer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if <code>length</code> is greater than <code>this.writableBytes</code> or
if <code>length</code> is greater then <code>source.readableBytes</code></dd>
</dl>
</li>
</ul>
<a id="writeBytes(org.apache.qpid.protonj2.buffer.ProtonBuffer,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeBytes&#8203;(<a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;source,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the current <code>writeIndex</code> and increases the <code>writeIndex</code>
by the number of the transferred bytes (= <code>length</code>). This method
does not modify the read index of the source buffer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dd><code>offset</code> - The offset in the source buffer to start writing into this buffer.</dd>
<dd><code>length</code> - The number of bytes to transfer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if the specified <code>offset</code> is less than <code>0</code>,
if <code>offset + length</code> is greater than
<code>source.capacity</code>, or
if <code>length</code> is greater than <code>this.writableBytes</code></dd>
</dl>
</li>
</ul>
<a id="writeBytes(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBytes</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeBytes&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink">ByteBuffer</a>&nbsp;source)</pre>
<div class="block">Transfers the specified source buffer's data to this buffer starting at
the current <code>writeIndex</code> until the source buffer's position
reaches its limit, and increases the <code>writeIndex</code> by the
number of the transferred bytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>source</code> - The source buffer from which the bytes are read.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this buffer for chaining</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if <code>source.remaining()</code> is greater than
<code>this.writableBytes</code></dd>
</dl>
</li>
</ul>
<a id="writeBoolean(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeBoolean</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeBoolean&#8203;(boolean&nbsp;value)</pre>
<div class="block">Writes a single boolean to the buffer and advances the write index by one.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The boolean to write into the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeShort(short)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeShort</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeShort&#8203;(short&nbsp;value)</pre>
<div class="block">Writes a single short to the buffer and advances the write index by two.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The short to write into the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeInt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeInt</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeInt&#8203;(int&nbsp;value)</pre>
<div class="block">Writes a single integer to the buffer and advances the write index by four.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The integer to write into the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeLong(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLong</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeLong&#8203;(long&nbsp;value)</pre>
<div class="block">Writes a single long to the buffer and advances the write index by eight.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The long to write into the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeFloat(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeFloat</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeFloat&#8203;(float&nbsp;value)</pre>
<div class="block">Writes a single float to the buffer and advances the write index by four.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The float to write into the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
<a id="writeDouble(double)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>writeDouble</h4>
<pre class="methodSignature"><a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a>&nbsp;writeDouble&#8203;(double&nbsp;value)</pre>
<div class="block">Writes a single double to the buffer and advances the write index by eight.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - The double to write into the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ProtonBuffer for chaining.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></code> - if there is no room in the buffer for this write operation.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ProtonBuffer.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="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>