blob: af3503de1fbd8c7ec25d74cecb199ee4ee24e20d [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>ByteBufferUtils (Apache HBase 4.0.0-alpha-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.hadoop.hbase.util, class: ByteBufferUtils">
<meta name="generator" content="javadoc/ClassWriterImpl">
<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.1.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>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/ByteBufferUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</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="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.hadoop.hbase.util</a></div>
<h1 title="Class ByteBufferUtils" class="title">Class ByteBufferUtils</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">java.lang.Object</a>
<div class="inheritance">org.apache.hadoop.hbase.util.ByteBufferUtils</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="annotations">@Private
</span><span class="modifiers">public final class </span><span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-43">ByteBufferUtils</a></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">Object</a></span></div>
<div class="block">Utility functions for working with byte buffers, such as reading/writing variable-length long
numbers.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="caption"><span>Nested Classes</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="ByteBufferUtils.CommonPrefixer.html" class="type-name-link" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.CommonPrefixer</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="ByteBufferUtils.CommonPrefixerHolder.html" class="type-name-link" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.CommonPrefixerHolder</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="ByteBufferUtils.Comparer.html" class="type-name-link" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.Comparer</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="ByteBufferUtils.ComparerHolder.html" class="type-name-link" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.ComparerHolder</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="ByteBufferUtils.Converter.html" class="type-name-link" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.Converter</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>(package private) static class&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="ByteBufferUtils.ConverterHolder.html" class="type-name-link" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.ConverterHolder</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final int</code></div>
<div class="col-second even-row-color"><code><a href="#NEXT_BIT_MASK" class="member-name-link">NEXT_BIT_MASK</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>static final int</code></div>
<div class="col-second odd-row-color"><code><a href="#NEXT_BIT_SHIFT" class="member-name-link">NEXT_BIT_SHIFT</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>(package private) static final boolean</code></div>
<div class="col-second even-row-color"><code><a href="#UNSAFE_AVAIL" class="member-name-link">UNSAFE_AVAIL</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>static final boolean</code></div>
<div class="col-second odd-row-color"><code><a href="#UNSAFE_UNALIGNED" class="member-name-link">UNSAFE_UNALIGNED</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>static final int</code></div>
<div class="col-second even-row-color"><code><a href="#VALUE_MASK" class="member-name-link">VALUE_MASK</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
</div>
</section>
</li>
<!-- ======== 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 three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ByteBufferUtils</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</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">
<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-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#arePartsEqual(java.nio.ByteBuffer,int,int,int,int)" class="member-name-link">arePartsEqual</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offsetLeft,
int&nbsp;lengthLeft,
int&nbsp;offsetRight,
int&nbsp;lengthRight)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Check whether two parts in the same buffer are equal.</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="#compareTo(byte%5B%5D,int,int,java.nio.ByteBuffer,int,int)" class="member-name-link">compareTo</a><wbr>(byte[]&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#compareTo(java.nio.ByteBuffer,int,int,byte%5B%5D,int,int)" class="member-name-link">compareTo</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
byte[]&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#compareTo(java.nio.ByteBuffer,int,int,java.nio.ByteBuffer,int,int)" class="member-name-link">compareTo</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>(package private) 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="#compareToUnsafe(java.lang.Object,long,int,java.lang.Object,long,int)" class="member-name-link">compareToUnsafe</a><wbr>(<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">Object</a>&nbsp;obj1,
long&nbsp;o1,
int&nbsp;l1,
<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">Object</a>&nbsp;obj2,
long&nbsp;o2,
int&nbsp;l2)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#copyBufferToStream(java.io.DataOutput,java.nio.ByteBuffer,int,int)" class="member-name-link">copyBufferToStream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataOutput.html" title="class or interface in java.io" class="external-link">DataOutput</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy data from a buffer to an output stream.</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="#copyBufferToStream(java.io.OutputStream,java.nio.ByteBuffer,int,int)" class="member-name-link">copyBufferToStream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy data from a buffer to an output stream.</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="#copyFromArrayToBuffer(java.nio.ByteBuffer,byte%5B%5D,int,int)" class="member-name-link">copyFromArrayToBuffer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
byte[]&nbsp;in,
int&nbsp;inOffset,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copies the bytes from given array's offset to length part into the given buffer.</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="#copyFromArrayToBuffer(java.nio.ByteBuffer,int,byte%5B%5D,int,int)" class="member-name-link">copyFromArrayToBuffer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
int&nbsp;outOffset,
byte[]&nbsp;in,
int&nbsp;inOffset,
int&nbsp;length)</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 given array's offset to length part into the given buffer.</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="#copyFromBufferToArray(byte%5B%5D,java.nio.ByteBuffer,int,int,int)" class="member-name-link">copyFromBufferToArray</a><wbr>(byte[]&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;sourceOffset,
int&nbsp;destinationOffset,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copies specified number of bytes from given offset of 'in' ByteBuffer to the array.</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="#copyFromBufferToBuffer(java.nio.ByteBuffer,java.nio.ByteBuffer)" class="member-name-link">copyFromBufferToBuffer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy one buffer's whole data to another.</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="#copyFromBufferToBuffer(java.nio.ByteBuffer,java.nio.ByteBuffer,int,int)" class="member-name-link">copyFromBufferToBuffer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
int&nbsp;sourceOffset,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy from one buffer to another from given offset.</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="#copyFromBufferToBuffer(java.nio.ByteBuffer,java.nio.ByteBuffer,int,int,int)" class="member-name-link">copyFromBufferToBuffer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
int&nbsp;sourceOffset,
int&nbsp;destinationOffset,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy from one buffer to another from given offset.</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="#copyFromStreamToBuffer(java.nio.ByteBuffer,java.io.DataInputStream,int)" class="member-name-link">copyFromStreamToBuffer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataInputStream.html" title="class or interface in java.io" class="external-link">DataInputStream</a>&nbsp;in,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy the given number of bytes from the given stream and put it at the current position of the
given buffer, updating the position in the buffer.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static byte[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#copyOfRange(java.nio.ByteBuffer,int,int)" class="member-name-link">copyOfRange</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;original,
int&nbsp;from,
int&nbsp;to)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Similar to <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Arrays.html#copyOfRange(byte%5B%5D,int,int)" title="class or interface in java.util" class="external-link"><code>Arrays.copyOfRange(byte[], int, int)</code></a></div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#drainInputStreamToBuffer(java.io.InputStream)" class="member-name-link">drainInputStreamToBuffer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;is)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy from the InputStream to a new heap ByteBuffer until the InputStream is exhausted.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#equals(java.nio.ByteBuffer,int,int,byte%5B%5D,int,int)" class="member-name-link">equals</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
byte[]&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#equals(java.nio.ByteBuffer,int,int,java.nio.ByteBuffer,int,int)" class="member-name-link">equals</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#extendLimit(java.nio.ByteBuffer,int)" class="member-name-link">extendLimit</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;numBytes)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#findCommonPrefix(byte%5B%5D,int,int,byte%5B%5D,int,int)" class="member-name-link">findCommonPrefix</a><wbr>(byte[]&nbsp;left,
int&nbsp;leftOffset,
int&nbsp;leftLength,
byte[]&nbsp;right,
int&nbsp;rightOffset,
int&nbsp;rightLength)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Find length of common prefix in two arrays.</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="#findCommonPrefix(java.nio.ByteBuffer,int,int,byte%5B%5D,int,int)" class="member-name-link">findCommonPrefix</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;left,
int&nbsp;leftOffset,
int&nbsp;leftLength,
byte[]&nbsp;right,
int&nbsp;rightOffset,
int&nbsp;rightLength)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Find length of common prefix in two arrays.</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="#findCommonPrefix(java.nio.ByteBuffer,int,int,java.nio.ByteBuffer,int,int)" class="member-name-link">findCommonPrefix</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;left,
int&nbsp;leftOffset,
int&nbsp;leftLength,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;right,
int&nbsp;rightOffset,
int&nbsp;rightLength)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Find length of common prefix in two arrays.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>(package private) 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="#findCommonPrefixUnsafe(java.lang.Object,long,int,java.lang.Object,long,int)" class="member-name-link">findCommonPrefixUnsafe</a><wbr>(<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">Object</a>&nbsp;left,
long&nbsp;leftOffset,
int&nbsp;leftLength,
<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">Object</a>&nbsp;right,
long&nbsp;rightOffset,
int&nbsp;rightLength)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#hashCode(java.nio.ByteBuffer,int,int)" class="member-name-link">hashCode</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">ByteBuffer to hash offset to start from length to hash</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="#intFitsIn(int)" class="member-name-link">intFitsIn</a><wbr>(int&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Check how many bytes is required to store value.</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="#longFitsIn(long)" class="member-name-link">longFitsIn</a><wbr>(long&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Check how many bytes are required to store value.</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="#moveBufferToStream(java.io.OutputStream,java.nio.ByteBuffer,int)" class="member-name-link">moveBufferToStream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy the data to the output stream and update position in buffer.</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="#putAsShort(java.nio.ByteBuffer,int,int)" class="member-name-link">putAsShort</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf,
int&nbsp;index,
int&nbsp;val)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#putByte(java.nio.ByteBuffer,int,byte)" class="member-name-link">putByte</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset,
byte&nbsp;b)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#putCompressedInt(java.io.OutputStream,int)" class="member-name-link">putCompressedInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
int&nbsp;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 in buffer integer using 7 bit encoding.</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="#putInt(java.io.OutputStream,int)" class="member-name-link">putInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
int&nbsp;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 in output stream 32 bit integer (Big Endian byte 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="#putInt(java.nio.ByteBuffer,int)" class="member-name-link">putInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;val)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Put an int value out to the given ByteBuffer's current position in big-endian format.</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="#putInt(java.nio.ByteBuffer,int,int)" class="member-name-link">putInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;index,
int&nbsp;val)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#putLong(java.io.OutputStream,long,int)" class="member-name-link">putLong</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
long&nbsp;value,
int&nbsp;fitInBytes)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#putLong(java.nio.ByteBuffer,int,long)" class="member-name-link">putLong</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;index,
long&nbsp;val)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#putLong(java.nio.ByteBuffer,long)" class="member-name-link">putLong</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
long&nbsp;val)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Put a long value out to the given ByteBuffer's current position in big-endian format.</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="#putShort(java.nio.ByteBuffer,int,short)" class="member-name-link">putShort</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;index,
short&nbsp;val)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#putShort(java.nio.ByteBuffer,short)" class="member-name-link">putShort</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
short&nbsp;val)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Put a short value out to the given ByteBuffer's current position in big-endian format.</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="#readAsInt(java.nio.ByteBuffer,int,int)" class="member-name-link">readAsInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Converts a ByteBuffer to an int value</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="#readCompressedInt(java.io.InputStream)" class="member-name-link">readCompressedInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;input)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Read integer from stream coded in 7 bits and increment position.</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="#readCompressedInt(java.nio.ByteBuffer)" class="member-name-link">readCompressedInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Read integer from buffer coded in 7 bits and increment position.</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="#readLong(java.io.InputStream,int)" class="member-name-link">readLong</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;in,
int&nbsp;fitInBytes)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Read long which was written to fitInBytes bytes and increment position.</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="#readLong(java.nio.ByteBuffer,int)" class="member-name-link">readLong</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;fitInBytes)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Read long which was written to fitInBytes bytes and increment position.</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="#readVLong(java.nio.ByteBuffer)" class="member-name-link">readVLong</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Similar to <code>WritableUtils.readVLong(DataInput)</code> but reads from a <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a>.</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="#readVLong(org.apache.hadoop.hbase.nio.ByteBuff)" class="member-name-link">readVLong</a><wbr>(<a href="../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Similar to <code>WritableUtils.readVLong(java.io.DataInput)</code> but reads from a
<a href="../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio"><code>ByteBuff</code></a>.</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="#searchDelimiterIndex(java.nio.ByteBuffer,int,int,int)" class="member-name-link">searchDelimiterIndex</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;b,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;delimiter)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Find index of passed delimiter.</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="#searchDelimiterIndexInReverse(java.nio.ByteBuffer,int,int,int)" class="member-name-link">searchDelimiterIndexInReverse</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;b,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;delimiter)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Find index of passed delimiter walking from end of buffer backwards.</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="#skip(java.nio.ByteBuffer,int)" class="member-name-link">skip</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Increment position in buffer.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigDecimal.html" title="class or interface in java.math" class="external-link">BigDecimal</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toBigDecimal(java.nio.ByteBuffer,int,int)" class="member-name-link">toBigDecimal</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Reads a BigDecimal value at the given buffer's offset.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static byte</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toByte(java.nio.ByteBuffer,int)" class="member-name-link">toByte</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static byte[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toBytes(java.nio.ByteBuffer,int)" class="member-name-link">toBytes</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;startPosition)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy the bytes from position to limit into a new byte[] of the exact length and sets the
position and limit back to their original values (though not thread safe).</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static byte[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toBytes(java.nio.ByteBuffer,int,int)" class="member-name-link">toBytes</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Copy the given number of bytes from specified offset into a new byte[]</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="#toDouble(java.nio.ByteBuffer,int)" class="member-name-link">toDouble</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Reads a double value at the given buffer's offset.</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="#toInt(java.nio.ByteBuffer)" class="member-name-link">toInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Reads an int value at the given buffer's current position.</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="#toInt(java.nio.ByteBuffer,int)" class="member-name-link">toInt</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Reads an int value at the given buffer's offset.</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="#toLong(java.nio.ByteBuffer,int)" class="member-name-link">toLong</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Reads a long value at the given buffer's offset.</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="#toShort(java.nio.ByteBuffer,int)" class="member-name-link">toShort</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Reads a short value at the given buffer's offset.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toStringBinary(java.nio.ByteBuffer)" class="member-name-link">toStringBinary</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;b)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toStringBinary(java.nio.ByteBuffer,int,int)" class="member-name-link">toStringBinary</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;b,
int&nbsp;off,
int&nbsp;len)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</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="#writeVLong(java.nio.ByteBuffer,long)" class="member-name-link">writeVLong</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
long&nbsp;i)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Similar to <code>WritableUtils.writeVLong(java.io.DataOutput, long)</code>, but writes to a
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a>.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;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">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">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">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">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">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">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">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">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">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">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">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">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="VALUE_MASK">
<h3>VALUE_MASK</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-46">VALUE_MASK</a></span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.ByteBufferUtils.VALUE_MASK">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="NEXT_BIT_SHIFT">
<h3>NEXT_BIT_SHIFT</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-47">NEXT_BIT_SHIFT</a></span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.ByteBufferUtils.NEXT_BIT_SHIFT">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="NEXT_BIT_MASK">
<h3>NEXT_BIT_MASK</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-48">NEXT_BIT_MASK</a></span></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.ByteBufferUtils.NEXT_BIT_MASK">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="UNSAFE_AVAIL">
<h3>UNSAFE_AVAIL</h3>
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-49">UNSAFE_AVAIL</a></span></div>
</section>
</li>
<li>
<section class="detail" id="UNSAFE_UNALIGNED">
<h3>UNSAFE_UNALIGNED</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-50">UNSAFE_UNALIGNED</a></span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>ByteBufferUtils</h3>
<div class="member-signature"><span class="modifiers">private</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-52">ByteBufferUtils</a></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="writeVLong(java.nio.ByteBuffer,long)">
<h3>writeVLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-442">writeVLong</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
long&nbsp;i)</span></div>
<div class="block">Similar to <code>WritableUtils.writeVLong(java.io.DataOutput, long)</code>, but writes to a
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a>.</div>
</section>
</li>
<li>
<section class="detail" id="readVLong(org.apache.hadoop.hbase.nio.ByteBuff)">
<h3>readVLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-475">readVLong</a></span><wbr><span class="parameters">(<a href="../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf)</span></div>
<div class="block">Similar to <code>WritableUtils.readVLong(java.io.DataInput)</code> but reads from a
<a href="../nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio"><code>ByteBuff</code></a>.</div>
</section>
</li>
<li>
<section class="detail" id="readVLong(java.nio.ByteBuffer)">
<h3>readVLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-510">readVLong</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf)</span></div>
<div class="block">Similar to <code>WritableUtils.readVLong(DataInput)</code> but reads from a <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link"><code>ByteBuffer</code></a>.</div>
</section>
</li>
<li>
<section class="detail" id="putCompressedInt(java.io.OutputStream,int)">
<h3>putCompressedInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-550">putCompressedInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
int&nbsp;value)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Put in buffer integer using 7 bit encoding. For each written byte: 7 bits are used to store
value 1 bit is used to indicate whether there is next bit.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - Int to be compressed.</dd>
<dd><code>out</code> - Where to put compressed data</dd>
<dt>Returns:</dt>
<dd>Number of bytes written.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - on stream error</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="putInt(java.io.OutputStream,int)">
<h3>putInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-571">putInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
int&nbsp;value)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Put in output stream 32 bit integer (Big Endian byte order).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>out</code> - Where to put integer.</dd>
<dd><code>value</code> - Value of integer.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - On stream error.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toByte(java.nio.ByteBuffer,int)">
<h3>toByte</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">byte</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-582">toByte</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</span></div>
</section>
</li>
<li>
<section class="detail" id="moveBufferToStream(java.io.OutputStream,java.nio.ByteBuffer,int)">
<h3>moveBufferToStream</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-596">moveBufferToStream</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;length)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Copy the data to the output stream and update position in buffer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>out</code> - the stream to write bytes to</dd>
<dd><code>in</code> - the buffer to read bytes from</dd>
<dd><code>length</code> - the number of bytes to copy</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyBufferToStream(java.io.OutputStream,java.nio.ByteBuffer,int,int)">
<h3>copyBufferToStream</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-610">copyBufferToStream</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;offset,
int&nbsp;length)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Copy data from a buffer to an output stream. Does not update the position in the buffer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>out</code> - the stream to write bytes to</dd>
<dd><code>in</code> - the buffer to read bytes from</dd>
<dd><code>offset</code> - the offset in the buffer (from the buffer's array offset) to start copying bytes
from</dd>
<dd><code>length</code> - the number of bytes to copy</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyBufferToStream(java.io.DataOutput,java.nio.ByteBuffer,int,int)">
<h3>copyBufferToStream</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-631">copyBufferToStream</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataOutput.html" title="class or interface in java.io" class="external-link">DataOutput</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;offset,
int&nbsp;length)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Copy data from a buffer to an output stream. Does not update the position in the buffer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>out</code> - the output stream to write bytes to</dd>
<dd><code>in</code> - the buffer to read bytes from</dd>
<dd><code>offset</code> - the offset in the buffer (from the buffer's array offset) to start copying bytes
from</dd>
<dd><code>length</code> - the number of bytes to copy</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="putLong(java.io.OutputStream,long,int)">
<h3>putLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-644">putLong</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/OutputStream.html" title="class or interface in java.io" class="external-link">OutputStream</a>&nbsp;out,
long&nbsp;value,
int&nbsp;fitInBytes)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</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/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="putByte(java.nio.ByteBuffer,int,byte)">
<h3>putByte</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-654">putByte</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset,
byte&nbsp;b)</span></div>
</section>
</li>
<li>
<section class="detail" id="longFitsIn(long)">
<h3>longFitsIn</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-668">longFitsIn</a></span><wbr><span class="parameters">(long&nbsp;value)</span></div>
<div class="block">Check how many bytes are required to store value.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - Value which size will be tested.</dd>
<dt>Returns:</dt>
<dd>How many bytes are required to store value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="intFitsIn(int)">
<h3>intFitsIn</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-704">intFitsIn</a></span><wbr><span class="parameters">(int&nbsp;value)</span></div>
<div class="block">Check how many bytes is required to store value.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - Value which size will be tested.</dd>
<dt>Returns:</dt>
<dd>How many bytes are required to store value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="readCompressedInt(java.io.InputStream)">
<h3>readCompressedInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-726">readCompressedInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;input)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Read integer from stream coded in 7 bits and increment position.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the integer that has been read</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - on stream error</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="readCompressedInt(java.nio.ByteBuffer)">
<h3>readCompressedInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-746">readCompressedInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer)</span></div>
<div class="block">Read integer from buffer coded in 7 bits and increment position.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Read integer.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="readLong(java.io.InputStream,int)">
<h3>readLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-760">readLong</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;in,
int&nbsp;fitInBytes)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Read long which was written to fitInBytes bytes and increment position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>fitInBytes</code> - In how many bytes given long is stored.</dd>
<dt>Returns:</dt>
<dd>The value of parsed long.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - on stream error</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="readLong(java.nio.ByteBuffer,int)">
<h3>readLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-773">readLong</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;fitInBytes)</span></div>
<div class="block">Read long which was written to fitInBytes bytes and increment position.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>fitInBytes</code> - In how many bytes given long is stored.</dd>
<dt>Returns:</dt>
<dd>The value of parsed long.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyFromStreamToBuffer(java.nio.ByteBuffer,java.io.DataInputStream,int)">
<h3>copyFromStreamToBuffer</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-788">copyFromStreamToBuffer</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/DataInputStream.html" title="class or interface in java.io" class="external-link">DataInputStream</a>&nbsp;in,
int&nbsp;length)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Copy the given number of bytes from the given stream and put it at the current position of the
given buffer, updating the position in the buffer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>out</code> - the buffer to write data to</dd>
<dd><code>in</code> - the stream to read data from</dd>
<dd><code>length</code> - the number of bytes to read/write</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="drainInputStreamToBuffer(java.io.InputStream)">
<h3>drainInputStreamToBuffer</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a></span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-803">drainInputStreamToBuffer</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/InputStream.html" title="class or interface in java.io" class="external-link">InputStream</a>&nbsp;is)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div>
<div class="block">Copy from the InputStream to a new heap ByteBuffer until the InputStream is exhausted.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyFromBufferToBuffer(java.nio.ByteBuffer,java.nio.ByteBuffer)">
<h3>copyFromBufferToBuffer</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-818">copyFromBufferToBuffer</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out)</span></div>
<div class="block">Copy one buffer's whole data to another. Write starts at the current position of 'out' buffer.
Note : This will advance the position marker of <code>out</code> and also change the position maker
for <code>in</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>in</code> - source buffer</dd>
<dd><code>out</code> - destination buffer</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyFromBufferToBuffer(java.nio.ByteBuffer,java.nio.ByteBuffer,int,int,int)">
<h3>copyFromBufferToBuffer</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-843">copyFromBufferToBuffer</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
int&nbsp;sourceOffset,
int&nbsp;destinationOffset,
int&nbsp;length)</span></div>
<div class="block">Copy from one buffer to another from given offset. This will be absolute positional copying and
won't affect the position of any of the buffers.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>in</code> - input bytebuffer</dd>
<dd><code>out</code> - destination bytebuffer</dd>
<dd><code>sourceOffset</code> - offset of source buffer</dd>
<dd><code>destinationOffset</code> - offset of destination buffer</dd>
<dd><code>length</code> - the number of bytes to copy</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyFromBufferToBuffer(java.nio.ByteBuffer,java.nio.ByteBuffer,int,int)">
<h3>copyFromBufferToBuffer</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-870">copyFromBufferToBuffer</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
int&nbsp;sourceOffset,
int&nbsp;length)</span></div>
<div class="block">Copy from one buffer to another from given offset.
<p>
Note : This will advance the position marker of <code>out</code> but not change the position maker
for <code>in</code></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>in</code> - source buffer</dd>
<dd><code>out</code> - destination buffer</dd>
<dd><code>sourceOffset</code> - offset in the source buffer</dd>
<dd><code>length</code> - how many bytes to copy</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findCommonPrefix(byte[],int,int,byte[],int,int)">
<h3>findCommonPrefix</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-895">findCommonPrefix</a></span><wbr><span class="parameters">(byte[]&nbsp;left,
int&nbsp;leftOffset,
int&nbsp;leftLength,
byte[]&nbsp;right,
int&nbsp;rightOffset,
int&nbsp;rightLength)</span></div>
<div class="block">Find length of common prefix in two arrays.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>left</code> - Array to be compared.</dd>
<dd><code>leftOffset</code> - Offset in left array.</dd>
<dd><code>leftLength</code> - Length of left array.</dd>
<dd><code>right</code> - Array to be compared.</dd>
<dd><code>rightOffset</code> - Offset in right array.</dd>
<dd><code>rightLength</code> - Length of right array.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findCommonPrefix(java.nio.ByteBuffer,int,int,java.nio.ByteBuffer,int,int)">
<h3>findCommonPrefix</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-909">findCommonPrefix</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;left,
int&nbsp;leftOffset,
int&nbsp;leftLength,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;right,
int&nbsp;rightOffset,
int&nbsp;rightLength)</span></div>
<div class="block">Find length of common prefix in two arrays.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>left</code> - ByteBuffer to be compared.</dd>
<dd><code>leftOffset</code> - Offset in left ByteBuffer.</dd>
<dd><code>leftLength</code> - Length of left ByteBuffer.</dd>
<dd><code>right</code> - ByteBuffer to be compared.</dd>
<dd><code>rightOffset</code> - Offset in right ByteBuffer.</dd>
<dd><code>rightLength</code> - Length of right ByteBuffer.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="findCommonPrefix(java.nio.ByteBuffer,int,int,byte[],int,int)">
<h3>findCommonPrefix</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-924">findCommonPrefix</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;left,
int&nbsp;leftOffset,
int&nbsp;leftLength,
byte[]&nbsp;right,
int&nbsp;rightOffset,
int&nbsp;rightLength)</span></div>
<div class="block">Find length of common prefix in two arrays.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>left</code> - ByteBuffer to be compared.</dd>
<dd><code>leftOffset</code> - Offset in left ByteBuffer.</dd>
<dd><code>leftLength</code> - Length of left ByteBuffer.</dd>
<dd><code>right</code> - Array to be compared</dd>
<dd><code>rightOffset</code> - Offset in right Array.</dd>
<dd><code>rightLength</code> - Length of right Array.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="arePartsEqual(java.nio.ByteBuffer,int,int,int,int)">
<h3>arePartsEqual</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-939">arePartsEqual</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offsetLeft,
int&nbsp;lengthLeft,
int&nbsp;offsetRight,
int&nbsp;lengthRight)</span></div>
<div class="block">Check whether two parts in the same buffer are equal.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - In which buffer there are parts</dd>
<dd><code>offsetLeft</code> - Beginning of first part.</dd>
<dd><code>lengthLeft</code> - Length of the first part.</dd>
<dd><code>offsetRight</code> - Beginning of the second part.</dd>
<dd><code>lengthRight</code> - Length of the second part.</dd>
<dt>Returns:</dt>
<dd>True if equal</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="skip(java.nio.ByteBuffer,int)">
<h3>skip</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-963">skip</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;length)</span></div>
<div class="block">Increment position in buffer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - In this buffer.</dd>
<dd><code>length</code> - By that many bytes.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="extendLimit(java.nio.ByteBuffer,int)">
<h3>extendLimit</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-967">extendLimit</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;numBytes)</span></div>
</section>
</li>
<li>
<section class="detail" id="toBytes(java.nio.ByteBuffer,int)">
<h3>toBytes</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-978">toBytes</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;startPosition)</span></div>
<div class="block">Copy the bytes from position to limit into a new byte[] of the exact length and sets the
position and limit back to their original values (though not thread safe).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - copy from here</dd>
<dd><code>startPosition</code> - put buffer.get(startPosition) into byte[0]</dd>
<dt>Returns:</dt>
<dd>a new byte[] containing the bytes in the specified range</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toBytes(java.nio.ByteBuffer,int,int)">
<h3>toBytes</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-994">toBytes</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block">Copy the given number of bytes from specified offset into a new byte[]</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - input bytebuffer to read</dd>
<dd><code>offset</code> - input offset where Bytes are</dd>
<dd><code>length</code> - the number of bytes to read</dd>
<dt>Returns:</dt>
<dd>a new byte[] containing the bytes in the specified range</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="equals(java.nio.ByteBuffer,int,int,java.nio.ByteBuffer,int,int)">
<h3>equals</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1002">equals</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</span></div>
</section>
</li>
<li>
<section class="detail" id="hashCode(java.nio.ByteBuffer,int,int)">
<h3>hashCode</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1019">hashCode</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block">ByteBuffer to hash offset to start from length to hash</div>
</section>
</li>
<li>
<section class="detail" id="compareTo(java.nio.ByteBuffer,int,int,java.nio.ByteBuffer,int,int)">
<h3>compareTo</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1027">compareTo</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</span></div>
</section>
</li>
<li>
<section class="detail" id="equals(java.nio.ByteBuffer,int,int,byte[],int,int)">
<h3>equals</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1031">equals</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
byte[]&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</span></div>
</section>
</li>
<li>
<section class="detail" id="compareTo(byte[],int,int,java.nio.ByteBuffer,int,int)">
<h3>compareTo</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1050">compareTo</a></span><wbr><span class="parameters">(byte[]&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</span></div>
</section>
</li>
<li>
<section class="detail" id="compareTo(java.nio.ByteBuffer,int,int,byte[],int,int)">
<h3>compareTo</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1054">compareTo</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf1,
int&nbsp;o1,
int&nbsp;l1,
byte[]&nbsp;buf2,
int&nbsp;o2,
int&nbsp;l2)</span></div>
</section>
</li>
<li>
<section class="detail" id="compareToUnsafe(java.lang.Object,long,int,java.lang.Object,long,int)">
<h3>compareToUnsafe</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1058">compareToUnsafe</a></span><wbr><span class="parameters">(<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">Object</a>&nbsp;obj1,
long&nbsp;o1,
int&nbsp;l1,
<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">Object</a>&nbsp;obj2,
long&nbsp;o2,
int&nbsp;l2)</span></div>
</section>
</li>
<li>
<section class="detail" id="findCommonPrefixUnsafe(java.lang.Object,long,int,java.lang.Object,long,int)">
<h3>findCommonPrefixUnsafe</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1100">findCommonPrefixUnsafe</a></span><wbr><span class="parameters">(<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">Object</a>&nbsp;left,
long&nbsp;leftOffset,
int&nbsp;leftLength,
<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">Object</a>&nbsp;right,
long&nbsp;rightOffset,
int&nbsp;rightLength)</span></div>
</section>
</li>
<li>
<section class="detail" id="toShort(java.nio.ByteBuffer,int)">
<h3>toShort</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">short</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1143">toShort</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</span></div>
<div class="block">Reads a short value at the given buffer's offset.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - input byte buffer to read</dd>
<dd><code>offset</code> - input offset where short is</dd>
<dt>Returns:</dt>
<dd>short value at offset</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toInt(java.nio.ByteBuffer)">
<h3>toInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1150">toInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer)</span></div>
<div class="block">Reads an int value at the given buffer's current position. Also advances the buffer's position</div>
</section>
</li>
<li>
<section class="detail" id="toInt(java.nio.ByteBuffer,int)">
<h3>toInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1160">toInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</span></div>
<div class="block">Reads an int value at the given buffer's offset.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - input byte buffer to read</dd>
<dd><code>offset</code> - input offset where int is</dd>
<dt>Returns:</dt>
<dd>int value at offset</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="readAsInt(java.nio.ByteBuffer,int,int)">
<h3>readAsInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1171">readAsInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block">Converts a ByteBuffer to an int value</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buf</code> - The ByteBuffer</dd>
<dd><code>offset</code> - Offset to int value</dd>
<dd><code>length</code> - Number of bytes used to store the int value.</dd>
<dt>Returns:</dt>
<dd>the int value if there's not enough bytes left in the buffer after the given offset</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toLong(java.nio.ByteBuffer,int)">
<h3>toLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1190">toLong</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</span></div>
<div class="block">Reads a long value at the given buffer's offset.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - input byte buffer to read</dd>
<dd><code>offset</code> - input offset where Long is</dd>
<dt>Returns:</dt>
<dd>long value at offset</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="putInt(java.nio.ByteBuffer,int)">
<h3>putInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1200">putInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;val)</span></div>
<div class="block">Put an int value out to the given ByteBuffer's current position in big-endian format. This also
advances the position in buffer by int size.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - the ByteBuffer to write to</dd>
<dd><code>val</code> - int to write out</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="putInt(java.nio.ByteBuffer,int,int)">
<h3>putInt</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1204">putInt</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;index,
int&nbsp;val)</span></div>
</section>
</li>
<li>
<section class="detail" id="toDouble(java.nio.ByteBuffer,int)">
<h3>toDouble</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1214">toDouble</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset)</span></div>
<div class="block">Reads a double value at the given buffer's offset.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - input byte buffer to read</dd>
<dd><code>offset</code> - offset where double is</dd>
<dt>Returns:</dt>
<dd>double value at offset</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toBigDecimal(java.nio.ByteBuffer,int,int)">
<h3>toBigDecimal</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/math/BigDecimal.html" title="class or interface in java.math" class="external-link">BigDecimal</a></span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1224">toBigDecimal</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;offset,
int&nbsp;length)</span></div>
<div class="block">Reads a BigDecimal value at the given buffer's offset.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - input bytebuffer to read</dd>
<dd><code>offset</code> - input offset</dd>
<dt>Returns:</dt>
<dd>BigDecimal value at offset</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="putShort(java.nio.ByteBuffer,short)">
<h3>putShort</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1241">putShort</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
short&nbsp;val)</span></div>
<div class="block">Put a short value out to the given ByteBuffer's current position in big-endian format. This
also advances the position in buffer by short size.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - the ByteBuffer to write to</dd>
<dd><code>val</code> - short to write out</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="putShort(java.nio.ByteBuffer,int,short)">
<h3>putShort</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1245">putShort</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;index,
short&nbsp;val)</span></div>
</section>
</li>
<li>
<section class="detail" id="putAsShort(java.nio.ByteBuffer,int,int)">
<h3>putAsShort</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1249">putAsShort</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buf,
int&nbsp;index,
int&nbsp;val)</span></div>
</section>
</li>
<li>
<section class="detail" id="putLong(java.nio.ByteBuffer,long)">
<h3>putLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1262">putLong</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
long&nbsp;val)</span></div>
<div class="block">Put a long value out to the given ByteBuffer's current position in big-endian format. This also
advances the position in buffer by long size.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>buffer</code> - the ByteBuffer to write to</dd>
<dd><code>val</code> - long to write out</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="putLong(java.nio.ByteBuffer,int,long)">
<h3>putLong</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1266">putLong</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;buffer,
int&nbsp;index,
long&nbsp;val)</span></div>
</section>
</li>
<li>
<section class="detail" id="copyFromArrayToBuffer(java.nio.ByteBuffer,byte[],int,int)">
<h3>copyFromArrayToBuffer</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1278">copyFromArrayToBuffer</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
byte[]&nbsp;in,
int&nbsp;inOffset,
int&nbsp;length)</span></div>
<div class="block">Copies the bytes from given array's offset to length part into the given buffer. Puts the bytes
to buffer's current position. This also advances the position in the 'out' buffer by 'length'</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>out</code> - output bytebuffer to copy to</dd>
<dd><code>in</code> - input array to copy from</dd>
<dd><code>inOffset</code> - input offset to copy from</dd>
<dd><code>length</code> - the number of bytes to copy</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyFromArrayToBuffer(java.nio.ByteBuffer,int,byte[],int,int)">
<h3>copyFromArrayToBuffer</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1301">copyFromArrayToBuffer</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;out,
int&nbsp;outOffset,
byte[]&nbsp;in,
int&nbsp;inOffset,
int&nbsp;length)</span></div>
<div class="block">Copies bytes from given array's offset to length part into the given buffer. Puts the bytes to
buffer's given position. This doesn't affect the position of buffer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>out</code> - output bytebuffer to copy to</dd>
<dd><code>outOffset</code> - output buffer offset</dd>
<dd><code>in</code> - input array to copy from</dd>
<dd><code>inOffset</code> - input offset to copy from</dd>
<dd><code>length</code> - the number of bytes to copy</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyFromBufferToArray(byte[],java.nio.ByteBuffer,int,int,int)">
<h3>copyFromBufferToArray</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1323">copyFromBufferToArray</a></span><wbr><span class="parameters">(byte[]&nbsp;out,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;in,
int&nbsp;sourceOffset,
int&nbsp;destinationOffset,
int&nbsp;length)</span></div>
<div class="block">Copies specified number of bytes from given offset of 'in' ByteBuffer to the array. This
doesn't affect the position of buffer.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>out</code> - output array to copy input bytebuffer to</dd>
<dd><code>in</code> - input bytebuffer to copy from</dd>
<dd><code>sourceOffset</code> - offset of source bytebuffer</dd>
<dd><code>destinationOffset</code> - offset of destination array</dd>
<dd><code>length</code> - the number of bytes to copy</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="copyOfRange(java.nio.ByteBuffer,int,int)">
<h3>copyOfRange</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1343">copyOfRange</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;original,
int&nbsp;from,
int&nbsp;to)</span></div>
<div class="block">Similar to <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Arrays.html#copyOfRange(byte%5B%5D,int,int)" title="class or interface in java.util" class="external-link"><code>Arrays.copyOfRange(byte[], int, int)</code></a></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>original</code> - the buffer from which the copy has to happen</dd>
<dd><code>from</code> - the starting index</dd>
<dd><code>to</code> - the ending index</dd>
<dt>Returns:</dt>
<dd>a byte[] created out of the copy</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toStringBinary(java.nio.ByteBuffer,int,int)">
<h3>toStringBinary</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<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">String</a></span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1354">toStringBinary</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;b,
int&nbsp;off,
int&nbsp;len)</span></div>
</section>
</li>
<li>
<section class="detail" id="toStringBinary(java.nio.ByteBuffer)">
<h3>toStringBinary</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<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">String</a></span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1377">toStringBinary</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;b)</span></div>
</section>
</li>
<li>
<section class="detail" id="searchDelimiterIndex(java.nio.ByteBuffer,int,int,int)">
<h3>searchDelimiterIndex</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1385">searchDelimiterIndex</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;b,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;delimiter)</span></div>
<div class="block">Find index of passed delimiter.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Index of delimiter having started from start of <code>b</code> moving rightward.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="searchDelimiterIndexInReverse(java.nio.ByteBuffer,int,int,int)">
<h3>searchDelimiterIndexInReverse</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line-1399">searchDelimiterIndexInReverse</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="external-link">ByteBuffer</a>&nbsp;b,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;delimiter)</span></div>
<div class="block">Find index of passed delimiter walking from end of buffer backwards.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Index of delimiter</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2007&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>