| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>ProtonBufferComponent (Qpid ProtonJ2 Parent 1.0.0-M18 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.qpid.protonj2.buffer, interface: ProtonBufferComponent"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/ProtonBufferComponent.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.qpid.protonj2.buffer</a></div> |
| <h1 title="Interface ProtonBufferComponent" class="title">Interface ProtonBufferComponent</h1> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><code><a href="netty/Netty4ToProtonBufferAdapter.html" title="class in org.apache.qpid.protonj2.buffer.netty">Netty4ToProtonBufferAdapter</a></code>, <code><a href="netty/Netty5ToProtonBufferAdapter.html" title="class in org.apache.qpid.protonj2.buffer.netty">Netty5ToProtonBufferAdapter</a></code>, <code><a href="impl/ProtonByteArrayBuffer.html" title="class in org.apache.qpid.protonj2.buffer.impl">ProtonByteArrayBuffer</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">ProtonBufferComponent</span></div> |
| <div class="block">A buffer component represents a single component of the memory backing |
| a <a href="ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> which could be a buffer that inherently made up of more |
| than one section of memory or it could be a intentional composite buffer |
| that collect individual buffers each with their own component backing.</div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ProtonBufferComponent.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBufferComponent</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#advanceReadOffset(int)" class="member-name-link">advanceReadOffset</a><wbr>(int amount)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Advances the internally maintained read offset for this component by the |
| given amount.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ProtonBufferComponent.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBufferComponent</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#advanceWriteOffset(int)" class="member-name-link">advanceWriteOffset</a><wbr>(int amount)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Advances the internally maintained write offset for this component by the |
| given amount.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="ProtonBufferIterator.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBufferIterator</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#bufferIterator()" class="member-name-link">bufferIterator</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Creates and returns a new <a href="ProtonBufferIterator.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBufferIterator</code></a> that iterates from the current |
| read offset and continues until all readable bytes have been traversed.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getNativeAddress()" class="member-name-link">getNativeAddress</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Gets the native address of the backing buffer if one exists otherwise returns 0.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getNativeReadAddress()" class="member-name-link">getNativeReadAddress</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Gets the native address where reads from this buffer component should start.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getNativeWriteAddress()" class="member-name-link">getNativeWriteAddress</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Gets the native address where write to this buffer component should start.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>byte[]</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getReadableArray()" class="member-name-link">getReadableArray</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the readable array if one exists or throws an exception.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getReadableArrayLength()" class="member-name-link">getReadableArrayLength</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getReadableArrayOffset()" class="member-name-link">getReadableArrayOffset</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getReadableBuffer()" class="member-name-link">getReadableBuffer</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the readable array if one exists or throws an exception.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getReadableBytes()" class="member-name-link">getReadableBytes</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the number of readable bytes in the buffer safely regards of |
| the actual memory backing this component.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>byte[]</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getWritableArray()" class="member-name-link">getWritableArray</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the writable array if one exists or throws an exception.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getWritableArrayLength()" class="member-name-link">getWritableArrayLength</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getWritableArrayOffset()" class="member-name-link">getWritableArrayOffset</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getWritableBuffer()" class="member-name-link">getWritableBuffer</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the writable <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a> if one exists or throws an exception.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getWritableBytes()" class="member-name-link">getWritableBytes</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the number of writable bytes in the buffer safely regards of |
| the actual memory backing this component.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#hasReadbleArray()" class="member-name-link">hasReadbleArray</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#hasWritableArray()" class="member-name-link">hasWritableArray</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#unwrap()" class="member-name-link">unwrap</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Unwraps the backing resource of this buffer component which can be |
| an external buffer type or other managed resource.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="unwrap()"> |
| <h3>unwrap</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span> <span class="element-name">unwrap</span>()</div> |
| <div class="block">Unwraps the backing resource of this buffer component which can be |
| an external buffer type or other managed resource.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the resource backing this component or null if none exists.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getReadableBytes()"> |
| <h3>getReadableBytes</h3> |
| <div class="member-signature"><span class="return-type">int</span> <span class="element-name">getReadableBytes</span>()</div> |
| <div class="block">Returns the number of readable bytes in the buffer safely regards of |
| the actual memory backing this component.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the number of readable bytes in this buffer component</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="hasReadbleArray()"> |
| <h3>hasReadbleArray</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">hasReadbleArray</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>true if the component is backed by a byte array that has a readable portion.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="advanceReadOffset(int)"> |
| <h3>advanceReadOffset</h3> |
| <div class="member-signature"><span class="return-type"><a href="ProtonBufferComponent.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBufferComponent</a></span> <span class="element-name">advanceReadOffset</span><wbr><span class="parameters">(int amount)</span></div> |
| <div class="block">Advances the internally maintained read offset for this component by the |
| given amount. If the amount to advance is greater than the available readable |
| bytes an exception is thrown.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>amount</code> - The amount to advance the read offset of this component by.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="ProtonBufferComponent.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBufferComponent</code></a> instance.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component is not backed by a readable array.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getReadableArray()"> |
| <h3>getReadableArray</h3> |
| <div class="member-signature"><span class="return-type">byte[]</span> <span class="element-name">getReadableArray</span>()</div> |
| <div class="block">Returns the readable array if one exists or throws an exception.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the readable array that backs this buffer component.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component is not backed by an array or has no readable bytes.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getReadableArrayOffset()"> |
| <h3>getReadableArrayOffset</h3> |
| <div class="member-signature"><span class="return-type">int</span> <span class="element-name">getReadableArrayOffset</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the offset into the readable array where the readable bytes begin.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component is not backed by a readable array.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getReadableArrayLength()"> |
| <h3>getReadableArrayLength</h3> |
| <div class="member-signature"><span class="return-type">int</span> <span class="element-name">getReadableArrayLength</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the length of the readable array from the offset that is owned by this component..</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component is not backed by a readable array.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getReadableBuffer()"> |
| <h3>getReadableBuffer</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></span> <span class="element-name">getReadableBuffer</span>()</div> |
| <div class="block">Returns the readable array if one exists or throws an exception.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the readable array that backs this buffer component.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component does not contain a readable portion.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getWritableBytes()"> |
| <h3>getWritableBytes</h3> |
| <div class="member-signature"><span class="return-type">int</span> <span class="element-name">getWritableBytes</span>()</div> |
| <div class="block">Returns the number of writable bytes in the buffer safely regards of |
| the actual memory backing this component.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the number of writable bytes in this buffer component</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="advanceWriteOffset(int)"> |
| <h3>advanceWriteOffset</h3> |
| <div class="member-signature"><span class="return-type"><a href="ProtonBufferComponent.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBufferComponent</a></span> <span class="element-name">advanceWriteOffset</span><wbr><span class="parameters">(int amount)</span></div> |
| <div class="block">Advances the internally maintained write offset for this component by the |
| given amount. If the amount to advance is greater than the available writable |
| bytes an exception is thrown.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>amount</code> - The amount to advance the write offset of this component by.</dd> |
| <dt>Returns:</dt> |
| <dd>this <a href="ProtonBufferComponent.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBufferComponent</code></a> instance.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component is not backed by a writable array.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="hasWritableArray()"> |
| <h3>hasWritableArray</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">hasWritableArray</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>true if the component is backed by a byte array that has writable bytes.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getWritableArray()"> |
| <h3>getWritableArray</h3> |
| <div class="member-signature"><span class="return-type">byte[]</span> <span class="element-name">getWritableArray</span>()</div> |
| <div class="block">Returns the writable array if one exists or throws an exception.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the writable array that backs this buffer component.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component is not backed by an writable array.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getWritableArrayOffset()"> |
| <h3>getWritableArrayOffset</h3> |
| <div class="member-signature"><span class="return-type">int</span> <span class="element-name">getWritableArrayOffset</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the offset into the writable array where the writable bytes begin.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component is not backed by a writable array.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getWritableArrayLength()"> |
| <h3>getWritableArrayLength</h3> |
| <div class="member-signature"><span class="return-type">int</span> <span class="element-name">getWritableArrayLength</span>()</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the length of the writable array from the offset that is owned by this component..</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component is not backed by a writable array.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getWritableBuffer()"> |
| <h3>getWritableBuffer</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></span> <span class="element-name">getWritableBuffer</span>()</div> |
| <div class="block">Returns the writable <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a> if one exists or throws an exception.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the writable buffer that backs this buffer component.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the component does not contain a writable portion.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="bufferIterator()"> |
| <h3>bufferIterator</h3> |
| <div class="member-signature"><span class="return-type"><a href="ProtonBufferIterator.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBufferIterator</a></span> <span class="element-name">bufferIterator</span>()</div> |
| <div class="block">Creates and returns a new <a href="ProtonBufferIterator.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBufferIterator</code></a> that iterates from the current |
| read offset and continues until all readable bytes have been traversed. The source buffer |
| read and write offsets are not modified by an iterator instance. |
| <p> |
| The caller must ensure that the source buffer lifetime extends beyond the lifetime of |
| the returned <a href="ProtonBufferIterator.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBufferIterator</code></a>.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a new buffer iterator that iterates over the readable bytes.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getNativeAddress()"> |
| <h3>getNativeAddress</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getNativeAddress</span>()</div> |
| <div class="block">Gets the native address of the backing buffer if one exists otherwise returns 0. |
| <p> |
| The returned address is the base address for the memory region that back this buffer which |
| should not be used for reads and write as the backing region could be larger and not all portions |
| of the backing region might be owned by this buffer component. The caller should use the methods |
| <a href="#getNativeReadAddress()"><code>getNativeReadAddress()</code></a> and <a href="#getNativeWriteAddress()"><code>getNativeWriteAddress()</code></a> which each use this method |
| to compute where these value actually fall in the native memory region.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The native memory address for the region backing this buffer, if any, otherwise 0.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getNativeReadAddress()"> |
| <h3>getNativeReadAddress</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getNativeReadAddress</span>()</div> |
| <div class="block">Gets the native address where reads from this buffer component should start.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The native memory address where reads start, if any, otherwise 0.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getNativeWriteAddress()"> |
| <h3>getNativeWriteAddress</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name">getNativeWriteAddress</span>()</div> |
| <div class="block">Gets the native address where write to this buffer component should start.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The native memory address where writing should start, if any, otherwise 0.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |