| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>ByteStream (OpenJ9 JDK 17)</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: module: openj9.traceformat, package: com.ibm.jvm.trace.format.api, class: ByteStream"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="com.ibm.jvm.trace.format.api.ByteStream class"> |
| <meta name="keywords" content="reverseBytes()"> |
| <meta name="keywords" content="add()"> |
| <meta name="keywords" content="get()"> |
| <meta name="keywords" content="getUTF8Char()"> |
| <meta name="keywords" content="getDouble()"> |
| <meta name="keywords" content="getFloat()"> |
| <meta name="keywords" content="getInt()"> |
| <meta name="keywords" content="getUnsignedInt()"> |
| <meta name="keywords" content="getLong()"> |
| <meta name="keywords" content="getShort()"> |
| <meta name="keywords" content="getASCIIString()"> |
| <meta name="keywords" content="getUTF8String()"> |
| <meta name="keywords" content="getBigInteger()"> |
| <meta name="keywords" content="order()"> |
| <meta name="keywords" content="setGuardBytes()"> |
| <meta name="keywords" content="getGuardBytes()"> |
| <meta name="keywords" content="truncate()"> |
| <meta name="keywords" content="remaining()"> |
| <meta name="keywords" content="peek()"> |
| <meta name="keywords" content="skip()"> |
| <meta name="keywords" content="put()"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../../script-dir/jquery-3.6.0.min.js"></script> |
| <script type="text/javascript" src="../../../../../../../script-dir/jquery-ui.min.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"; |
| var pathtoroot = "../../../../../../../"; |
| loadScripts(document, 'script');</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> |
| <div class="about-language"><div style="margin-top: 9px;"><strong>OpenJ9 JDK 17</strong></div></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../../../index.html">Overview</a></li> |
| <li><a href="../../../../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/ByteStream.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../index-files/index-1.html">Index</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><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </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="module-label-in-type">Module</span> <a href="../../../../../../module-summary.html">openj9.traceformat</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">com.ibm.jvm.trace.format.api</a></div> |
| <h1 title="Class ByteStream" class="title">Class ByteStream</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">java.lang.Object</a> |
| <div class="inheritance">com.ibm.jvm.trace.format.api.ByteStream</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ByteStream</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">Object</a></span></div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ByteStream</a>()</code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(byte%5B%5D)" class="member-name-link">ByteStream</a><wbr>(byte[] data)</code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(byte%5B%5D,int)" class="member-name-link">ByteStream</a><wbr>(byte[] data, |
| int offset)</code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(byte%5B%5D,int,int)" class="member-name-link">ByteStream</a><wbr>(byte[] data, |
| int offset, |
| int length)</code></div> |
| <div class="col-last odd-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== 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-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete 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-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(byte%5B%5D)" class="member-name-link">add</a><wbr>(byte[] data)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(byte%5B%5D,int)" class="member-name-link">add</a><wbr>(byte[] data, |
| int offset)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(byte%5B%5D,int,int)" class="member-name-link">add</a><wbr>(byte[] data, |
| int offset, |
| int length)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>byte</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#get()" class="member-name-link">get</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#get(byte%5B%5D)" class="member-name-link">get</a><wbr>(byte[] dst)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#get(byte%5B%5D,int,int)" class="member-name-link">get</a><wbr>(byte[] dst, |
| int offset, |
| int length)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>byte</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#get(int)" class="member-name-link">get</a><wbr>(int index)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getASCIIString()" class="member-name-link">getASCIIString</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getASCIIString(int)" class="member-name-link">getASCIIString</a><wbr>(int length)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigInteger.html" title="class or interface in java.math" class="external-link" target="_blank">BigInteger</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getBigInteger(int)" class="member-name-link">getBigInteger</a><wbr>(int bytes)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">reads the specified number of bytes and turns them in to a positive |
| BigInteger</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDouble()" class="member-name-link">getDouble</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDouble(int)" class="member-name-link">getDouble</a><wbr>(int index)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>float</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getFloat()" class="member-name-link">getFloat</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>float</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getFloat(int)" class="member-name-link">getFloat</a><wbr>(int index)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGuardBytes()" class="member-name-link">getGuardBytes</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getInt()" class="member-name-link">getInt</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getInt(int)" class="member-name-link">getInt</a><wbr>(int index)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLong()" class="member-name-link">getLong</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLong(int)" class="member-name-link">getLong</a><wbr>(int index)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>short</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getShort()" class="member-name-link">getShort</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>short</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getShort(int)" class="member-name-link">getShort</a><wbr>(int index)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getUnsignedInt()" class="member-name-link">getUnsignedInt</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getUnsignedInt(int)" class="member-name-link">getUnsignedInt</a><wbr>(int index)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>char</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getUTF8Char()" class="member-name-link">getUTF8Char</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>char</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getUTF8Char(int)" class="member-name-link">getUTF8Char</a><wbr>(int index)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getUTF8String()" class="member-name-link">getUTF8String</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Constructs a string.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteOrder.html" title="class or interface in java.nio" class="external-link" target="_blank">ByteOrder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#order()" class="member-name-link">order</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#order(java.nio.ByteOrder)" class="member-name-link">order</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteOrder.html" title="class or interface in java.nio" class="external-link" target="_blank">ByteOrder</a> order)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Default order is big endian and that's what you'll get if you pass |
| null in.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>byte</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#peek()" class="member-name-link">peek</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#peek(byte%5B%5D)" class="member-name-link">peek</a><wbr>(byte[] dest)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#put(byte%5B%5D,int)" class="member-name-link">put</a><wbr>(byte[] data, |
| int index)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">This method, in addition to putByte, is negatively indexed, i.e. it |
| indexes from the end of the data.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>byte</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#put(byte,int)" class="member-name-link">put</a><wbr>(byte b, |
| int index)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">This takes a negative index and puts byte b in the index specified |
| working back from the end of the rawData as if it were one large |
| array allowing negative addressing.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#remaining()" class="member-name-link">remaining</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#reverseBytes(byte%5B%5D)" class="member-name-link">reverseBytes</a><wbr>(byte[] data)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setGuardBytes(int)" class="member-name-link">setGuardBytes</a><wbr>(int bytes)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#skip(int)" class="member-name-link">skip</a><wbr>(int bytes)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#truncate(byte%5B%5D)" class="member-name-link">truncate</a><wbr>(byte[] bytes)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">This allows you to strip off the last n bytes from the stream so long |
| as they've not been reached.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#truncate(int)" class="member-name-link">truncate</a><wbr>(int bytes)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">This allows you to strip off the last n bytes from the stream so long |
| as they've not been reached.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods declared in class java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link" target="_blank">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link" target="_blank">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link" target="_blank">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link" target="_blank">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link" target="_blank">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link" target="_blank">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link" target="_blank">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link" target="_blank">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link" target="_blank">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link" target="_blank">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link" target="_blank">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>(byte[])"> |
| <h3>ByteStream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">ByteStream</span><wbr><span class="parameters">(byte[] data)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(byte[],int)"> |
| <h3>ByteStream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">ByteStream</span><wbr><span class="parameters">(byte[] data, |
| int offset)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(byte[],int,int)"> |
| <h3>ByteStream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">ByteStream</span><wbr><span class="parameters">(byte[] data, |
| int offset, |
| int length)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>ByteStream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">ByteStream</span>()</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="reverseBytes(byte[])"> |
| <h3>reverseBytes</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">reverseBytes</span><wbr><span class="parameters">(byte[] data)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="add(byte[])"> |
| <h3>add</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">add</span><wbr><span class="parameters">(byte[] data)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="add(byte[],int)"> |
| <h3>add</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">add</span><wbr><span class="parameters">(byte[] data, |
| int offset)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="add(byte[],int,int)"> |
| <h3>add</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">add</span><wbr><span class="parameters">(byte[] data, |
| int offset, |
| int length)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="get()"> |
| <h3>get</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">byte</span> <span class="element-name">get</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="get(int)"> |
| <h3>get</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">byte</span> <span class="element-name">get</span><wbr><span class="parameters">(int index)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getUTF8Char()"> |
| <h3>getUTF8Char</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">char</span> <span class="element-name">getUTF8Char</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getUTF8Char(int)"> |
| <h3>getUTF8Char</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">char</span> <span class="element-name">getUTF8Char</span><wbr><span class="parameters">(int index)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDouble()"> |
| <h3>getDouble</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getDouble</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDouble(int)"> |
| <h3>getDouble</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">double</span> <span class="element-name">getDouble</span><wbr><span class="parameters">(int index)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getFloat()"> |
| <h3>getFloat</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">float</span> <span class="element-name">getFloat</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getFloat(int)"> |
| <h3>getFloat</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">float</span> <span class="element-name">getFloat</span><wbr><span class="parameters">(int index)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getInt()"> |
| <h3>getInt</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getInt</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getInt(int)"> |
| <h3>getInt</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getInt</span><wbr><span class="parameters">(int index)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getUnsignedInt()"> |
| <h3>getUnsignedInt</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">long</span> <span class="element-name">getUnsignedInt</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getUnsignedInt(int)"> |
| <h3>getUnsignedInt</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">long</span> <span class="element-name">getUnsignedInt</span><wbr><span class="parameters">(int index)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLong()"> |
| <h3>getLong</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">long</span> <span class="element-name">getLong</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLong(int)"> |
| <h3>getLong</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">long</span> <span class="element-name">getLong</span><wbr><span class="parameters">(int index)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getShort()"> |
| <h3>getShort</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">short</span> <span class="element-name">getShort</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getShort(int)"> |
| <h3>getShort</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">short</span> <span class="element-name">getShort</span><wbr><span class="parameters">(int index)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getASCIIString(int)"> |
| <h3>getASCIIString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></span> <span class="element-name">getASCIIString</span><wbr><span class="parameters">(int length)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getASCIIString()"> |
| <h3>getASCIIString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></span> <span class="element-name">getASCIIString</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getUTF8String()"> |
| <h3>getUTF8String</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></span> <span class="element-name">getUTF8String</span>() |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/UnsupportedEncodingException.html" title="class or interface in java.io" class="external-link" target="_blank">UnsupportedEncodingException</a></span></div> |
| <div class="block">Constructs a string. This has a prerequisite that the string is |
| prefixed with a short specifying it's length.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/UnsupportedEncodingException.html" title="class or interface in java.io" class="external-link" target="_blank">UnsupportedEncodingException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getBigInteger(int)"> |
| <h3>getBigInteger</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigInteger.html" title="class or interface in java.math" class="external-link" target="_blank">BigInteger</a></span> <span class="element-name">getBigInteger</span><wbr><span class="parameters">(int bytes)</span></div> |
| <div class="block">reads the specified number of bytes and turns them in to a positive |
| BigInteger</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>bytes</code> - </dd> |
| <dt>Returns:</dt> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="get(byte[])"> |
| <h3>get</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">get</span><wbr><span class="parameters">(byte[] dst)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="get(byte[],int,int)"> |
| <h3>get</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">get</span><wbr><span class="parameters">(byte[] dst, |
| int offset, |
| int length)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="order()"> |
| <h3>order</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteOrder.html" title="class or interface in java.nio" class="external-link" target="_blank">ByteOrder</a></span> <span class="element-name">order</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="order(java.nio.ByteOrder)"> |
| <h3>order</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">order</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteOrder.html" title="class or interface in java.nio" class="external-link" target="_blank">ByteOrder</a> order)</span></div> |
| <div class="block">Default order is big endian and that's what you'll get if you pass |
| null in.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>order</code> - </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setGuardBytes(int)"> |
| <h3>setGuardBytes</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setGuardBytes</span><wbr><span class="parameters">(int bytes)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getGuardBytes()"> |
| <h3>getGuardBytes</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getGuardBytes</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="truncate(int)"> |
| <h3>truncate</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">truncate</span><wbr><span class="parameters">(int bytes)</span></div> |
| <div class="block">This allows you to strip off the last n bytes from the stream so long |
| as they've not been reached. This will remove data until it hits the |
| beginning of the stream, then will throw an exception. If an |
| exception is thrown the stream will be completely empty, all data |
| discarded.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>bytes</code> - - the number of bytes to remove</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/BufferUnderflowException.html" title="class or interface in java.nio" class="external-link" target="_blank">BufferUnderflowException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="truncate(byte[])"> |
| <h3>truncate</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">truncate</span><wbr><span class="parameters">(byte[] bytes)</span></div> |
| <div class="block">This allows you to strip off the last n bytes from the stream so long |
| as they've not been reached. This will remove data until it hits the |
| beginning of the stream, then will return. The data that's truncated |
| will be placed into the provided array, filling from the end (i.e. if |
| there's insufficient data in the stream to fill the array then the |
| initial bytes in the array will be zero.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>bytes</code> - - the number of bytes to remove</dd> |
| <dt>Returns:</dt> |
| <dd>- the number of bytes truncated</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="remaining()"> |
| <h3>remaining</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">remaining</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="peek()"> |
| <h3>peek</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">byte</span> <span class="element-name">peek</span>() |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/BufferUnderflowException.html" title="class or interface in java.nio" class="external-link" target="_blank">BufferUnderflowException</a></span></div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/BufferUnderflowException.html" title="class or interface in java.nio" class="external-link" target="_blank">BufferUnderflowException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="peek(byte[])"> |
| <h3>peek</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">peek</span><wbr><span class="parameters">(byte[] dest)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="skip(int)"> |
| <h3>skip</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">skip</span><wbr><span class="parameters">(int bytes)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="put(byte[],int)"> |
| <h3>put</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">put</span><wbr><span class="parameters">(byte[] data, |
| int index)</span></div> |
| <div class="block">This method, in addition to putByte, is negatively indexed, i.e. it |
| indexes from the end of the data. This is primarily because it's hard |
| to be sure where the start of the data is in relation to the bytes we |
| know we can modify, i.e. those bytes that are guarded. |
| |
| put(data, -1) will insert the bytes in data in the last but one |
| position of the stream, moving the last byte in the stream out by |
| data.length and increase the count of guarded bytes by data.length</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>data</code> - - the data to insert</dd> |
| <dd><code>index</code> - - the negative index at which to insert, must be |
| within the guard bytes</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="put(byte,int)"> |
| <h3>put</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">byte</span> <span class="element-name">put</span><wbr><span class="parameters">(byte b, |
| int index)</span></div> |
| <div class="block">This takes a negative index and puts byte b in the index specified |
| working back from the end of the rawData as if it were one large |
| array allowing negative addressing. Positive indexes throw index out |
| of bounds. It is worth noting that an index of -1 means the last byte |
| present, i.e. we are not zero indexed.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>index</code> - </dd> |
| <dd><code>b</code> - - the original byte we're replacing</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small><a href="https://www.eclipse.org/openj9/" target="_blank">Eclipse OpenJ9 website.</a><br> To raise a bug report or suggest an improvement create an <a href="https://github.com/eclipse-openj9/openj9/issues" target="_blank">Eclipse Openj9 issue.</a><br> Copyright © 1998, 2022 IBM Corp. and others.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |