| <!DOCTYPE HTML> |
| <html lang> |
| <head> |
| <!-- Generated by javadoc (25) --> |
| <title>ByteArrayUtil (datasketches-java 9.0.1-SNAPSHOT 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.datasketches.common, class: ByteArrayUtil"> |
| <meta name="generator" content="javadoc/ClassWriter"> |
| <link rel="stylesheet" type="text/css" href="../../../../resource-files/jquery-ui.min.css"> |
| <link rel="stylesheet" type="text/css" href="../../../../resource-files/stylesheet.css"> |
| <script type="text/javascript" src="../../../../script-files/script.js"></script> |
| <script type="text/javascript" src="../../../../script-files/jquery-3.7.1.min.js"></script> |
| <script type="text/javascript" src="../../../../script-files/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">const pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="nav-content"> |
| <div class="nav-menu-button"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button></div> |
| <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 class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/ByteArrayUtil.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../search.html">Search</a></li> |
| <li><a href="../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| </div> |
| <div class="sub-nav"> |
| <div class="nav-content"> |
| <ol class="sub-nav-list"> |
| <li><a href="package-summary.html">org.apache.datasketches.common</a></li> |
| <li><a href="ByteArrayUtil.html" class="current-selection">ByteArrayUtil</a></li> |
| </ol> |
| <div class="nav-list-search"><input type="text" id="search-input" disabled placeholder="Search documentation (type /)" aria-label="Search in documentation" autocomplete="off" spellcheck="false"><input type="reset" id="reset-search" disabled value="Reset"></div> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="main-grid"> |
| <nav role="navigation" class="toc" aria-label="Table of contents"> |
| <div class="toc-header">Contents <input type="text" class="filter-input" disabled placeholder="Filter contents (type .)" aria-label="Filter table of contents" autocomplete="off" spellcheck="false"><input type="reset" class="reset-filter" disabled tabindex="-1" value="Reset"></div> |
| <ol class="toc-list" tabindex="-1"> |
| <li><a href="#" tabindex="0">Description</a></li> |
| <li><a href="#constructor-summary" tabindex="0">Constructor Summary</a></li> |
| <li><a href="#method-summary" tabindex="0">Method Summary</a></li> |
| <li><a href="#constructor-detail" tabindex="0">Constructor Details</a> |
| <ol class="toc-list"> |
| <li><a href="#%3Cinit%3E()" tabindex="0">ByteArrayUtil()</a></li> |
| </ol> |
| </li> |
| <li><a href="#method-detail" tabindex="0">Method Details</a> |
| <ol class="toc-list"> |
| <li><a href="#copyBytes(byte%5B%5D,int,byte%5B%5D,int,int)" tabindex="0">copyBytes(byte[], int, byte[], int, int)</a></li> |
| <li><a href="#getShortLE(byte%5B%5D,int)" tabindex="0">getShortLE(byte[], int)</a></li> |
| <li><a href="#putShortLE(byte%5B%5D,int,short)" tabindex="0">putShortLE(byte[], int, short)</a></li> |
| <li><a href="#getShortBE(byte%5B%5D,int)" tabindex="0">getShortBE(byte[], int)</a></li> |
| <li><a href="#putShortBE(byte%5B%5D,int,short)" tabindex="0">putShortBE(byte[], int, short)</a></li> |
| <li><a href="#getIntLE(byte%5B%5D,int)" tabindex="0">getIntLE(byte[], int)</a></li> |
| <li><a href="#putIntLE(byte%5B%5D,int,int)" tabindex="0">putIntLE(byte[], int, int)</a></li> |
| <li><a href="#getIntBE(byte%5B%5D,int)" tabindex="0">getIntBE(byte[], int)</a></li> |
| <li><a href="#putIntBE(byte%5B%5D,int,int)" tabindex="0">putIntBE(byte[], int, int)</a></li> |
| <li><a href="#getLongLE(byte%5B%5D,int)" tabindex="0">getLongLE(byte[], int)</a></li> |
| <li><a href="#putLongLE(byte%5B%5D,int,long)" tabindex="0">putLongLE(byte[], int, long)</a></li> |
| <li><a href="#getLongBE(byte%5B%5D,int)" tabindex="0">getLongBE(byte[], int)</a></li> |
| <li><a href="#putLongBE(byte%5B%5D,int,long)" tabindex="0">putLongBE(byte[], int, long)</a></li> |
| <li><a href="#getFloatLE(byte%5B%5D,int)" tabindex="0">getFloatLE(byte[], int)</a></li> |
| <li><a href="#putFloatLE(byte%5B%5D,int,float)" tabindex="0">putFloatLE(byte[], int, float)</a></li> |
| <li><a href="#getFloatBE(byte%5B%5D,int)" tabindex="0">getFloatBE(byte[], int)</a></li> |
| <li><a href="#putFloatBE(byte%5B%5D,int,float)" tabindex="0">putFloatBE(byte[], int, float)</a></li> |
| <li><a href="#getDoubleLE(byte%5B%5D,int)" tabindex="0">getDoubleLE(byte[], int)</a></li> |
| <li><a href="#putDoubleLE(byte%5B%5D,int,double)" tabindex="0">putDoubleLE(byte[], int, double)</a></li> |
| <li><a href="#getDoubleBE(byte%5B%5D,int)" tabindex="0">getDoubleBE(byte[], int)</a></li> |
| <li><a href="#putDoubleBE(byte%5B%5D,int,double)" tabindex="0">putDoubleBE(byte[], int, double)</a></li> |
| </ol> |
| </li> |
| </ol> |
| <button class="hide-sidebar"><span>Hide sidebar </span><img src="../../../../resource-files/left.svg" alt="Hide sidebar"></button><button class="show-sidebar"><img src="../../../../resource-files/right.svg" alt="Show sidebar"><span> Show sidebar</span></button></nav> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <h1 title="Class ByteArrayUtil" class="title">Class ByteArrayUtil</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.datasketches.common.ByteArrayUtil</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="horizontal-scroll"> |
| <div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">ByteArrayUtil</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div> |
| <div class="block">Useful methods for byte arrays.</div> |
| <dl class="notes"> |
| <dt>Author:</dt> |
| <dd>Lee Rhodes</dd> |
| </dl> |
| </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">ByteArrayUtil</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">No argument constructor.</div> |
| </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-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static 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" aria-labelledby="method-summary-table-tab0"> |
| <div class="summary-table three-column-summary"> |
| <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-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#copyBytes(byte%5B%5D,int,byte%5B%5D,int,int)" class="member-name-link">copyBytes</a><wbr>(byte[] source, |
| int srcStart, |
| byte[] target, |
| int tgtStart, |
| int numBytes)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Copies bytes from source to target with offsets on both the source and target.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static double</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getDoubleBE(byte%5B%5D,int)" class="member-name-link">getDoubleBE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>double</i> from the given byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static double</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getDoubleLE(byte%5B%5D,int)" class="member-name-link">getDoubleLE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>double</i> from the given byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static float</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getFloatBE(byte%5B%5D,int)" class="member-name-link">getFloatBE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>float</i> from the given byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static float</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getFloatLE(byte%5B%5D,int)" class="member-name-link">getFloatLE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>float</i> from the given byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getIntBE(byte%5B%5D,int)" class="member-name-link">getIntBE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>int</i> from the given byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getIntLE(byte%5B%5D,int)" class="member-name-link">getIntLE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>int</i> from the given byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLongBE(byte%5B%5D,int)" class="member-name-link">getLongBE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>long</i> from the source byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLongLE(byte%5B%5D,int)" class="member-name-link">getLongLE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>long</i> from the given byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static short</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getShortBE(byte%5B%5D,int)" class="member-name-link">getShortBE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>short</i> from the given byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static short</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getShortLE(byte%5B%5D,int)" class="member-name-link">getShortLE</a><wbr>(byte[] array, |
| int offset)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Get a <i>short</i> from the given byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putDoubleBE(byte%5B%5D,int,double)" class="member-name-link">putDoubleBE</a><wbr>(byte[] array, |
| int offset, |
| double value)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>double</i> into the destination byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putDoubleLE(byte%5B%5D,int,double)" class="member-name-link">putDoubleLE</a><wbr>(byte[] array, |
| int offset, |
| double value)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>double</i> into the destination byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putFloatBE(byte%5B%5D,int,float)" class="member-name-link">putFloatBE</a><wbr>(byte[] array, |
| int offset, |
| float value)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>float</i> into the destination byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putFloatLE(byte%5B%5D,int,float)" class="member-name-link">putFloatLE</a><wbr>(byte[] array, |
| int offset, |
| float value)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>float</i> into the destination byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putIntBE(byte%5B%5D,int,int)" class="member-name-link">putIntBE</a><wbr>(byte[] array, |
| int offset, |
| int value)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>int</i> into the destination byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putIntLE(byte%5B%5D,int,int)" class="member-name-link">putIntLE</a><wbr>(byte[] array, |
| int offset, |
| int value)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>int</i> into the destination byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putLongBE(byte%5B%5D,int,long)" class="member-name-link">putLongBE</a><wbr>(byte[] array, |
| int offset, |
| long value)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>long</i> into the destination byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putLongLE(byte%5B%5D,int,long)" class="member-name-link">putLongLE</a><wbr>(byte[] array, |
| int offset, |
| long value)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>long</i> into the destination byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putShortBE(byte%5B%5D,int,short)" class="member-name-link">putShortBE</a><wbr>(byte[] array, |
| int offset, |
| short value)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>short</i> into the destination byte array starting at the given offset |
| in big endian order.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#putShortLE(byte%5B%5D,int,short)" class="member-name-link">putShortLE</a><wbr>(byte[] array, |
| int offset, |
| short value)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Put the source <i>short</i> into the destination byte array starting at the given offset |
| in little endian order.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#method-summary" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">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>()"> |
| <h3>ByteArrayUtil</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">ByteArrayUtil</span>()</div> |
| <div class="block">No argument constructor.</div> |
| </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="copyBytes(byte[],int,byte[],int,int)"> |
| <h3>copyBytes</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">copyBytes</span><wbr><span class="parameters">(byte[] source, |
| int srcStart, |
| byte[] target, |
| int tgtStart, |
| int numBytes)</span></div> |
| <div class="block">Copies bytes from source to target with offsets on both the source and target.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>source</code> - the given source</dd> |
| <dd><code>srcStart</code> - the source starting index</dd> |
| <dd><code>target</code> - the give target</dd> |
| <dd><code>tgtStart</code> - the target starting index</dd> |
| <dd><code>numBytes</code> - the number of bytes to be transferred.</dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getShortLE(byte[],int)"> |
| <h3>getShortLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">short</span> <span class="element-name">getShortLE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>short</i> from the given byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>short</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putShortLE(byte[],int,short)"> |
| <h3>putShortLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putShortLE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| short value)</span></div> |
| <div class="block">Put the source <i>short</i> into the destination byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>short</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getShortBE(byte[],int)"> |
| <h3>getShortBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">short</span> <span class="element-name">getShortBE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>short</i> from the given byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>short</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putShortBE(byte[],int,short)"> |
| <h3>putShortBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putShortBE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| short value)</span></div> |
| <div class="block">Put the source <i>short</i> into the destination byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>short</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getIntLE(byte[],int)"> |
| <h3>getIntLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">int</span> <span class="element-name">getIntLE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>int</i> from the given byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>int</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putIntLE(byte[],int,int)"> |
| <h3>putIntLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putIntLE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| int value)</span></div> |
| <div class="block">Put the source <i>int</i> into the destination byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>int</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getIntBE(byte[],int)"> |
| <h3>getIntBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">int</span> <span class="element-name">getIntBE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>int</i> from the given byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>int</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putIntBE(byte[],int,int)"> |
| <h3>putIntBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putIntBE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| int value)</span></div> |
| <div class="block">Put the source <i>int</i> into the destination byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>int</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLongLE(byte[],int)"> |
| <h3>getLongLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">long</span> <span class="element-name">getLongLE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>long</i> from the given byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>long</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putLongLE(byte[],int,long)"> |
| <h3>putLongLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putLongLE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| long value)</span></div> |
| <div class="block">Put the source <i>long</i> into the destination byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>long</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLongBE(byte[],int)"> |
| <h3>getLongBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">long</span> <span class="element-name">getLongBE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>long</i> from the source byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source starting point</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>long</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putLongBE(byte[],int,long)"> |
| <h3>putLongBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putLongBE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| long value)</span></div> |
| <div class="block">Put the source <i>long</i> into the destination byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination starting point</dd> |
| <dd><code>value</code> - source <i>long</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getFloatLE(byte[],int)"> |
| <h3>getFloatLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">float</span> <span class="element-name">getFloatLE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>float</i> from the given byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>float</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putFloatLE(byte[],int,float)"> |
| <h3>putFloatLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putFloatLE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| float value)</span></div> |
| <div class="block">Put the source <i>float</i> into the destination byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>float</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getFloatBE(byte[],int)"> |
| <h3>getFloatBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">float</span> <span class="element-name">getFloatBE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>float</i> from the given byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>float</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putFloatBE(byte[],int,float)"> |
| <h3>putFloatBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putFloatBE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| float value)</span></div> |
| <div class="block">Put the source <i>float</i> into the destination byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>float</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDoubleLE(byte[],int)"> |
| <h3>getDoubleLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">double</span> <span class="element-name">getDoubleLE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>double</i> from the given byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>double</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putDoubleLE(byte[],int,double)"> |
| <h3>putDoubleLE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putDoubleLE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| double value)</span></div> |
| <div class="block">Put the source <i>double</i> into the destination byte array starting at the given offset |
| in little endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>double</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDoubleBE(byte[],int)"> |
| <h3>getDoubleBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">double</span> <span class="element-name">getDoubleBE</span><wbr><span class="parameters">(byte[] array, |
| int offset)</span></div> |
| <div class="block">Get a <i>double</i> from the given byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - source byte array</dd> |
| <dd><code>offset</code> - source offset</dd> |
| <dt>Returns:</dt> |
| <dd>the <i>double</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="putDoubleBE(byte[],int,double)"> |
| <h3>putDoubleBE</h3> |
| <div class="horizontal-scroll"> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">putDoubleBE</span><wbr><span class="parameters">(byte[] array, |
| int offset, |
| double value)</span></div> |
| <div class="block">Put the source <i>double</i> into the destination byte array starting at the given offset |
| in big endian order. |
| There is no bounds checking.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>array</code> - destination byte array</dd> |
| <dd><code>offset</code> - destination offset</dd> |
| <dd><code>value</code> - source <i>double</i></dd> |
| </dl> |
| </div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2015–2025 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </main> |
| </div> |
| </body> |
| </html> |