blob: bd80de4f6b206f53089cea3d88ef5fbe3250ed99 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Bytes (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Bytes (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":10,"i9":9,"i10":9,"i11":10,"i12":9,"i13":9,"i14":9,"i15":9,"i16":10,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":10,"i23":9,"i24":9,"i25":9,"i26":10,"i27":9,"i28":10,"i29":10,"i30":9,"i31":10,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":10,"i73":10,"i74":9,"i75":9,"i76":9,"i77":9,"i78":9,"i79":9,"i80":9,"i81":9,"i82":9,"i83":9,"i84":9,"i85":9,"i86":9,"i87":9,"i88":9,"i89":9,"i90":9,"i91":9,"i92":9,"i93":9,"i94":9,"i95":9,"i96":9,"i97":9,"i98":9,"i99":9,"i100":9,"i101":9,"i102":9,"i103":9,"i104":9,"i105":9,"i106":9,"i107":9,"i108":9,"i109":9,"i110":9,"i111":9,"i112":10,"i113":9,"i114":9,"i115":9,"i116":9,"i117":9,"i118":9,"i119":9,"i120":9,"i121":9,"i122":9,"i123":9,"i124":9,"i125":9,"i126":9,"i127":9,"i128":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Bytes.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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/hadoop/hbase/util/ByteRangeUtils.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.ByteArrayComparator.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/hadoop/hbase/util/Bytes.html" target="_top">Frames</a></li>
<li><a href="Bytes.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<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="subNavList">
<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>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.hadoop.hbase.util</div>
<h2 title="Class Bytes" class="title">Class Bytes</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.hadoop.hbase.util.Bytes</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html" title="class in org.apache.hadoop.hbase.util">Bytes</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Public
public class <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.62">Bytes</a>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html" title="class in org.apache.hadoop.hbase.util">Bytes</a>&gt;</pre>
<div class="block">Utility class that handles byte arrays, conversions to/from other types,
comparisons, hash code generation, manufacturing keys for HashMaps or
HashSets, and can be used as key in maps or trees.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.ByteArrayComparator.html" title="class in org.apache.hadoop.hbase.util">Bytes.ByteArrayComparator</a></span></code>
<div class="block">Byte array comparator class.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static interface&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.Comparer.html" title="interface in org.apache.hadoop.hbase.util">Bytes.Comparer</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.Comparer.html" title="type parameter in Bytes.Comparer">T</a>&gt;</span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.Converter.html" title="class in org.apache.hadoop.hbase.util">Bytes.Converter</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.ConverterHolder.html" title="class in org.apache.hadoop.hbase.util">Bytes.ConverterHolder</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.LexicographicalComparerHolder.html" title="class in org.apache.hadoop.hbase.util">Bytes.LexicographicalComparerHolder</a></span></code>
<div class="block">Provides a lexicographical comparer implementation; either a Java
implementation or a faster implementation based on <code>Unsafe</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.RowEndKeyComparator.html" title="class in org.apache.hadoop.hbase.util">Bytes.RowEndKeyComparator</a></span></code>
<div class="block">A <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.ByteArrayComparator.html" title="class in org.apache.hadoop.hbase.util"><code>Bytes.ByteArrayComparator</code></a> that treats the empty array as the largest value.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#bytes">bytes</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a>&lt;byte[]&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#BYTES_COMPARATOR">BYTES_COMPARATOR</a></span></code>
<div class="block">Pass this to TreeMaps where byte [] are keys.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static org.apache.hadoop.io.RawComparator&lt;byte[]&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#BYTES_RAWCOMPARATOR">BYTES_RAWCOMPARATOR</a></span></code>
<div class="block">Use comparing byte arrays, byte-by-byte</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#EMPTY_BYTE_ARRAY">EMPTY_BYTE_ARRAY</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#ESTIMATED_HEAP_TAX">ESTIMATED_HEAP_TAX</a></span></code>
<div class="block">Estimate of size cost to pay beyond payload in jvm for instance of byte [].</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static char[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#HEX_CHARS">HEX_CHARS</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static char[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#HEX_CHARS_UPPER">HEX_CHARS_UPPER</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#length">length</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static org.slf4j.Logger</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#LOG">LOG</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#MASK_FOR_LOWER_INT_IN_LONG">MASK_FOR_LOWER_INT_IN_LONG</a></span></code>
<div class="block">Mask to apply to a long to reveal the lower int only.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#offset">offset</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security">SecureRandom</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#RNG">RNG</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_BOOLEAN">SIZEOF_BOOLEAN</a></span></code>
<div class="block">Size of boolean in bytes</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_BYTE">SIZEOF_BYTE</a></span></code>
<div class="block">Size of byte in bytes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_CHAR">SIZEOF_CHAR</a></span></code>
<div class="block">Size of char in bytes</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_DOUBLE">SIZEOF_DOUBLE</a></span></code>
<div class="block">Size of double in bytes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_FLOAT">SIZEOF_FLOAT</a></span></code>
<div class="block">Size of float in bytes</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_INT">SIZEOF_INT</a></span></code>
<div class="block">Size of int in bytes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_LONG">SIZEOF_LONG</a></span></code>
<div class="block">Size of long in bytes</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_SHORT">SIZEOF_SHORT</a></span></code>
<div class="block">Size of short in bytes</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#UNSAFE_UNALIGNED">UNSAFE_UNALIGNED</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#UTF8_CSN">UTF8_CSN</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#Bytes--">Bytes</a></span>()</code>
<div class="block">Create a zero-size sequence.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#Bytes-byte:A-">Bytes</a></span>(byte[]&nbsp;bytes)</code>
<div class="block">Create a Bytes using the byte array as the initial value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#Bytes-byte:A-int-int-">Bytes</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Set the value to a given byte range</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#Bytes-org.apache.hadoop.hbase.util.Bytes-">Bytes</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html" title="class in org.apache.hadoop.hbase.util">Bytes</a>&nbsp;ibw)</code>
<div class="block">Set the new Bytes to the contents of the passed
<code>ibw</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#add-byte:A:A-">add</a></span>(byte[][]&nbsp;arrays)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#add-byte:A-byte:A-">add</a></span>(byte[]&nbsp;a,
byte[]&nbsp;b)</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#add-byte:A-byte:A-byte:A-">add</a></span>(byte[]&nbsp;a,
byte[]&nbsp;b,
byte[]&nbsp;c)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>private static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#binaryIncrementNeg-byte:A-long-">binaryIncrementNeg</a></span>(byte[]&nbsp;value,
long&nbsp;amount)</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>private static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#binaryIncrementPos-byte:A-long-">binaryIncrementPos</a></span>(byte[]&nbsp;value,
long&nbsp;amount)</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#binarySearch-byte:A:A-byte:A-int-int-">binarySearch</a></span>(byte[][]&nbsp;arr,
byte[]&nbsp;key,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Binary search for keys in indexes using Bytes.BYTES_RAWCOMPARATOR.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#binarySearch-org.apache.hadoop.hbase.Cell:A-org.apache.hadoop.hbase.Cell-org.apache.hadoop.hbase.CellComparator-">binarySearch</a></span>(<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>[]&nbsp;arr,
<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;key,
<a href="../../../../../org/apache/hadoop/hbase/CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comparator)</code>
<div class="block">Binary search for keys in indexes.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#bytesToVint-byte:A-">bytesToVint</a></span>(byte[]&nbsp;buffer)</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#compareTo-byte:A-">compareTo</a></span>(byte[]&nbsp;that)</code>
<div class="block">Compares the bytes in this object to the specified byte array</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#compareTo-byte:A-byte:A-">compareTo</a></span>(byte[]&nbsp;left,
byte[]&nbsp;right)</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#compareTo-byte:A-int-int-byte:A-int-int-">compareTo</a></span>(byte[]&nbsp;buffer1,
int&nbsp;offset1,
int&nbsp;length1,
byte[]&nbsp;buffer2,
int&nbsp;offset2,
int&nbsp;length2)</code>
<div class="block">Lexicographically compare two arrays.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#compareTo-org.apache.hadoop.hbase.util.Bytes-">compareTo</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html" title="class in org.apache.hadoop.hbase.util">Bytes</a>&nbsp;that)</code>
<div class="block">Define the sort order of the Bytes.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#contains-byte:A-byte-">contains</a></span>(byte[]&nbsp;array,
byte&nbsp;target)</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#contains-byte:A-byte:A-">contains</a></span>(byte[]&nbsp;array,
byte[]&nbsp;target)</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#copy-byte:A-">copy</a></span>(byte[]&nbsp;bytes)</code>
<div class="block">Copy the byte array given in parameter and return an instance
of a new byte array with the same length and the same content.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#copy-byte:A-int-int-">copy</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Copy the byte array given in parameter and return an instance
of a new byte array with the same length and the same content.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#copyBytes--">copyBytes</a></span>()</code>
<div class="block">Returns a copy of the bytes referred to by this writable</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#createMaxByteArray-int-">createMaxByteArray</a></span>(int&nbsp;maxByteCount)</code>
<div class="block">Create a max byte array with the specified max byte count</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#equals-byte:A-byte:A-">equals</a></span>(byte[]&nbsp;left,
byte[]&nbsp;right)</code>&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#equals-byte:A-java.nio.ByteBuffer-">equals</a></span>(byte[]&nbsp;a,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#equals-byte:A-int-int-byte:A-int-int-">equals</a></span>(byte[]&nbsp;left,
int&nbsp;leftOffset,
int&nbsp;leftLen,
byte[]&nbsp;right,
int&nbsp;rightOffset,
int&nbsp;rightLen)</code>&nbsp;</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#equals-java.util.List-java.util.List-">equals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;byte[]&gt;&nbsp;a,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;byte[]&gt;&nbsp;b)</code>&nbsp;</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#equals-java.lang.Object-">equals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;right_obj)</code>&nbsp;</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>private static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#explainWrongLengthOrOffset-byte:A-int-int-int-">explainWrongLengthOrOffset</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;expectedLength)</code>&nbsp;</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#findCommonPrefix-byte:A-byte:A-int-int-int-int-">findCommonPrefix</a></span>(byte[]&nbsp;left,
byte[]&nbsp;right,
int&nbsp;leftLength,
int&nbsp;rightLength,
int&nbsp;leftOffset,
int&nbsp;rightOffset)</code>&nbsp;</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#fromHex-java.lang.String-">fromHex</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hex)</code>
<div class="block">Create a byte array from a string of hash digits.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#get--">get</a></span>()</code>
<div class="block">Get the data from the Bytes.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#getBytes-java.nio.ByteBuffer-">getBytes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>
<div class="block">Returns a new byte array, copied from the given <code>buf</code>,
from the position (inclusive) to the limit (exclusive).</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#getLength--">getLength</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#getOffset--">getOffset</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;byte[]&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#getUtf8ByteArrays-java.util.List-">getUtf8ByteArrays</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;strings)</code>&nbsp;</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#hashCode--">hashCode</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#hashCode-byte:A-">hashCode</a></span>(byte[]&nbsp;b)</code>&nbsp;</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#hashCode-byte:A-int-">hashCode</a></span>(byte[]&nbsp;b,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#hashCode-byte:A-int-int-">hashCode</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#head-byte:A-int-">head</a></span>(byte[]&nbsp;a,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>private static byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#hexCharsToByte-char-char-">hexCharsToByte</a></span>(char&nbsp;c1,
char&nbsp;c2)</code>&nbsp;</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>private static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#hexCharToNibble-char-">hexCharToNibble</a></span>(char&nbsp;ch)</code>&nbsp;</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#incrementBytes-byte:A-long-">incrementBytes</a></span>(byte[]&nbsp;value,
long&nbsp;amount)</code>
<div class="block">Bytewise binary increment/deincrement of long contained in byte array
on given amount.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#indexOf-byte:A-byte-">indexOf</a></span>(byte[]&nbsp;array,
byte&nbsp;target)</code>
<div class="block">Returns the index of the first appearance of the value <code>target</code> in
<code>array</code>.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#indexOf-byte:A-byte:A-">indexOf</a></span>(byte[]&nbsp;array,
byte[]&nbsp;target)</code>
<div class="block">Returns the start position of the first occurrence of the specified <code>target</code> within <code>array</code>, or <code>-1</code> if there is no such occurrence.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>private static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#isHexDigit-char-">isHexDigit</a></span>(char&nbsp;c)</code>&nbsp;</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#isSorted-java.util.Collection-">isSorted</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;byte[]&gt;&nbsp;arrays)</code>&nbsp;</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;byte[]&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#iterateOnSplits-byte:A-byte:A-boolean-int-">iterateOnSplits</a></span>(byte[]&nbsp;a,
byte[]&nbsp;b,
boolean&nbsp;inclusive,
int&nbsp;num)</code>
<div class="block">Iterate over keys within the passed range.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;byte[]&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#iterateOnSplits-byte:A-byte:A-int-">iterateOnSplits</a></span>(byte[]&nbsp;a,
byte[]&nbsp;b,
int&nbsp;num)</code>
<div class="block">Iterate over keys within the passed range, splitting at an [a,b) boundary.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#len-byte:A-">len</a></span>(byte[]&nbsp;b)</code>
<div class="block">Returns length of the byte array, returning 0 if the array is null.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>(package private) static <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.Comparer.html" title="interface in org.apache.hadoop.hbase.util">Bytes.Comparer</a>&lt;byte[]&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#lexicographicalComparerJavaImpl--">lexicographicalComparerJavaImpl</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#mapKey-byte:A-">mapKey</a></span>(byte[]&nbsp;b)</code>&nbsp;</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#mapKey-byte:A-int-">mapKey</a></span>(byte[]&nbsp;b,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#multiple-byte:A-int-">multiple</a></span>(byte[]&nbsp;srcBytes,
int&nbsp;multiNum)</code>
<div class="block">Create a byte array which is multiple given bytes</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#padHead-byte:A-int-">padHead</a></span>(byte[]&nbsp;a,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#padTail-byte:A-int-">padTail</a></span>(byte[]&nbsp;a,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putAsShort-byte:A-int-int-">putAsShort</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;val)</code>
<div class="block">Put an int value as short out to the specified byte array position.</div>
</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putBigDecimal-byte:A-int-java.math.BigDecimal-">putBigDecimal</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;val)</code>
<div class="block">Put a BigDecimal value out to the specified byte array position.</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putByte-byte:A-int-byte-">putByte</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
byte&nbsp;b)</code>
<div class="block">Write a single byte out to the specified byte array position.</div>
</td>
</tr>
<tr id="i55" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putByteBuffer-byte:A-int-java.nio.ByteBuffer-">putByteBuffer</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>
<div class="block">Add the whole content of the ByteBuffer to the bytes arrays.</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putBytes-byte:A-int-byte:A-int-int-">putBytes</a></span>(byte[]&nbsp;tgtBytes,
int&nbsp;tgtOffset,
byte[]&nbsp;srcBytes,
int&nbsp;srcOffset,
int&nbsp;srcLength)</code>
<div class="block">Put bytes at the specified byte array position.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putDouble-byte:A-int-double-">putDouble</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
double&nbsp;d)</code>&nbsp;</td>
</tr>
<tr id="i58" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putFloat-byte:A-int-float-">putFloat</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
float&nbsp;f)</code>&nbsp;</td>
</tr>
<tr id="i59" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putInt-byte:A-int-int-">putInt</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;val)</code>
<div class="block">Put an int value out to the specified byte array position.</div>
</td>
</tr>
<tr id="i60" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putLong-byte:A-int-long-">putLong</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
long&nbsp;val)</code>
<div class="block">Put a long value out to the specified byte array position.</div>
</td>
</tr>
<tr id="i61" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#putShort-byte:A-int-short-">putShort</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
short&nbsp;val)</code>
<div class="block">Put a short value out to the specified byte array position.</div>
</td>
</tr>
<tr id="i62" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#random-byte:A-">random</a></span>(byte[]&nbsp;b)</code>
<div class="block">Fill given array with random bytes.</div>
</td>
</tr>
<tr id="i63" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#random-byte:A-int-int-">random</a></span>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Fill given array with random bytes at the specified position.</div>
</td>
</tr>
<tr id="i64" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#readAsInt-byte:A-int-int-">readAsInt</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to an int value</div>
</td>
</tr>
<tr id="i65" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#readAsVLong-byte:A-int-">readAsVLong</a></span>(byte[]&nbsp;buffer,
int&nbsp;offset)</code>
<div class="block">Reads a zero-compressed encoded long from input buffer and returns it.</div>
</td>
</tr>
<tr id="i66" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#readByteArray-java.io.DataInput-">readByteArray</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in)</code>
<div class="block">Read byte-array written with a WritableableUtils.vint prefix.</div>
</td>
</tr>
<tr id="i67" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#readByteArrayThrowsRuntime-java.io.DataInput-">readByteArrayThrowsRuntime</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in)</code>
<div class="block">Read byte-array written with a WritableableUtils.vint prefix.</div>
</td>
</tr>
<tr id="i68" class="altColor">
<td class="colFirst"><code>private static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#readBytes-java.nio.ByteBuffer-">readBytes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>&nbsp;</td>
</tr>
<tr id="i69" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#readStringFixedSize-java.io.DataInput-int-">readStringFixedSize</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in,
int&nbsp;size)</code>
<div class="block">Reads a fixed-size field and interprets it as a string padded with zeros.</div>
</td>
</tr>
<tr id="i70" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#searchDelimiterIndex-byte:A-int-int-int-">searchDelimiterIndex</a></span>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;delimiter)</code>&nbsp;</td>
</tr>
<tr id="i71" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#searchDelimiterIndexInReverse-byte:A-int-int-int-">searchDelimiterIndexInReverse</a></span>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;delimiter)</code>
<div class="block">Find index of passed delimiter walking from end of buffer backwards.</div>
</td>
</tr>
<tr id="i72" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#set-byte:A-">set</a></span>(byte[]&nbsp;b)</code>&nbsp;</td>
</tr>
<tr id="i73" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#set-byte:A-int-int-">set</a></span>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i74" class="altColor">
<td class="colFirst"><code>static byte[][]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#split-byte:A-byte:A-boolean-int-">split</a></span>(byte[]&nbsp;a,
byte[]&nbsp;b,
boolean&nbsp;inclusive,
int&nbsp;num)</code>
<div class="block">Split passed range.</div>
</td>
</tr>
<tr id="i75" class="rowColor">
<td class="colFirst"><code>static byte[][]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#split-byte:A-byte:A-int-">split</a></span>(byte[]&nbsp;a,
byte[]&nbsp;b,
int&nbsp;num)</code>
<div class="block">Split passed range.</div>
</td>
</tr>
<tr id="i76" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#startsWith-byte:A-byte:A-">startsWith</a></span>(byte[]&nbsp;bytes,
byte[]&nbsp;prefix)</code>
<div class="block">Return true if the byte array on the right is a prefix of the byte
array on the left.</div>
</td>
</tr>
<tr id="i77" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#tail-byte:A-int-">tail</a></span>(byte[]&nbsp;a,
int&nbsp;length)</code>&nbsp;</td>
</tr>
<tr id="i78" class="altColor">
<td class="colFirst"><code>static byte[][]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toArray-java.util.List-">toArray</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;byte[]&gt;&nbsp;array)</code>&nbsp;</td>
</tr>
<tr id="i79" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBigDecimal-byte:A-">toBigDecimal</a></span>(byte[]&nbsp;bytes)</code>
<div class="block">Converts a byte array to a BigDecimal</div>
</td>
</tr>
<tr id="i80" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBigDecimal-byte:A-int-int-">toBigDecimal</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to a BigDecimal value</div>
</td>
</tr>
<tr id="i81" class="rowColor">
<td class="colFirst"><code>static byte[][]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBinaryByteArrays-java.lang.String:A-">toBinaryByteArrays</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;t)</code>&nbsp;</td>
</tr>
<tr id="i82" class="altColor">
<td class="colFirst"><code>static byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBinaryFromHex-byte-">toBinaryFromHex</a></span>(byte&nbsp;ch)</code>
<div class="block">Takes a ASCII digit in the range A-F0-9 and returns
the corresponding integer/ordinal value.</div>
</td>
</tr>
<tr id="i83" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBoolean-byte:A-">toBoolean</a></span>(byte[]&nbsp;b)</code>
<div class="block">Reverses <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-boolean-"><code>toBytes(boolean)</code></a></div>
</td>
</tr>
<tr id="i84" class="altColor">
<td class="colFirst"><code>static byte[][]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toByteArrays-byte:A-">toByteArrays</a></span>(byte[]&nbsp;column)</code>&nbsp;</td>
</tr>
<tr id="i85" class="rowColor">
<td class="colFirst"><code>static byte[][]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toByteArrays-java.lang.String-">toByteArrays</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;column)</code>&nbsp;</td>
</tr>
<tr id="i86" class="altColor">
<td class="colFirst"><code>static byte[][]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toByteArrays-java.lang.String:A-">toByteArrays</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;t)</code>&nbsp;</td>
</tr>
<tr id="i87" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-java.math.BigDecimal-">toBytes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;val)</code>
<div class="block">Convert a BigDecimal value to a byte array</div>
</td>
</tr>
<tr id="i88" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-boolean-">toBytes</a></span>(boolean&nbsp;b)</code>
<div class="block">Convert a boolean to a byte array.</div>
</td>
</tr>
<tr id="i89" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-java.nio.ByteBuffer-">toBytes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>
<div class="block">Returns a new byte array, copied from the given <code>buf</code>,
from the index 0 (inclusive) to the limit (exclusive),
regardless of the current position.</div>
</td>
</tr>
<tr id="i90" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-double-">toBytes</a></span>(double&nbsp;d)</code>
<div class="block">Serialize a double as the IEEE 754 double format output.</div>
</td>
</tr>
<tr id="i91" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-float-">toBytes</a></span>(float&nbsp;f)</code>&nbsp;</td>
</tr>
<tr id="i92" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-int-">toBytes</a></span>(int&nbsp;val)</code>
<div class="block">Convert an int value to a byte array.</div>
</td>
</tr>
<tr id="i93" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-long-">toBytes</a></span>(long&nbsp;val)</code>
<div class="block">Convert a long value to a byte array using big-endian.</div>
</td>
</tr>
<tr id="i94" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-short-">toBytes</a></span>(short&nbsp;val)</code>
<div class="block">Convert a short value to a byte array of <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_SHORT"><code>SIZEOF_SHORT</code></a> bytes long.</div>
</td>
</tr>
<tr id="i95" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-java.lang.String-">toBytes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;s)</code>
<div class="block">Converts a string to a UTF-8 byte array.</div>
</td>
</tr>
<tr id="i96" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytesBinary-java.lang.String-">toBytesBinary</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;in)</code>&nbsp;</td>
</tr>
<tr id="i97" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toDouble-byte:A-">toDouble</a></span>(byte[]&nbsp;bytes)</code>&nbsp;</td>
</tr>
<tr id="i98" class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toDouble-byte:A-int-">toDouble</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>&nbsp;</td>
</tr>
<tr id="i99" class="rowColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toFloat-byte:A-">toFloat</a></span>(byte[]&nbsp;bytes)</code>
<div class="block">Presumes float encoded as IEEE 754 floating-point "single format"</div>
</td>
</tr>
<tr id="i100" class="altColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toFloat-byte:A-int-">toFloat</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>
<div class="block">Presumes float encoded as IEEE 754 floating-point "single format"</div>
</td>
</tr>
<tr id="i101" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toHex-byte:A-">toHex</a></span>(byte[]&nbsp;b)</code>
<div class="block">Convert a byte array into a hex string</div>
</td>
</tr>
<tr id="i102" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toHex-byte:A-int-int-">toHex</a></span>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Convert a byte range into a hex string</div>
</td>
</tr>
<tr id="i103" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toInt-byte:A-">toInt</a></span>(byte[]&nbsp;bytes)</code>
<div class="block">Converts a byte array to an int value</div>
</td>
</tr>
<tr id="i104" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toInt-byte:A-int-">toInt</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>
<div class="block">Converts a byte array to an int value</div>
</td>
</tr>
<tr id="i105" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toInt-byte:A-int-int-">toInt</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to an int value</div>
</td>
</tr>
<tr id="i106" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toLong-byte:A-">toLong</a></span>(byte[]&nbsp;bytes)</code>
<div class="block">Converts a byte array to a long value.</div>
</td>
</tr>
<tr id="i107" class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toLong-byte:A-int-">toLong</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>
<div class="block">Converts a byte array to a long value.</div>
</td>
</tr>
<tr id="i108" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toLong-byte:A-int-int-">toLong</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to a long value.</div>
</td>
</tr>
<tr id="i109" class="rowColor">
<td class="colFirst"><code>static short</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toShort-byte:A-">toShort</a></span>(byte[]&nbsp;bytes)</code>
<div class="block">Converts a byte array to a short value</div>
</td>
</tr>
<tr id="i110" class="altColor">
<td class="colFirst"><code>static short</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toShort-byte:A-int-">toShort</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset)</code>
<div class="block">Converts a byte array to a short value</div>
</td>
</tr>
<tr id="i111" class="rowColor">
<td class="colFirst"><code>static short</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toShort-byte:A-int-int-">toShort</a></span>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Converts a byte array to a short value</div>
</td>
</tr>
<tr id="i112" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i113" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toString-byte:A-">toString</a></span>(byte[]&nbsp;b)</code>&nbsp;</td>
</tr>
<tr id="i114" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toString-byte:A-int-">toString</a></span>(byte[]&nbsp;b,
int&nbsp;off)</code>
<div class="block">This method will convert utf8 encoded bytes into a string.</div>
</td>
</tr>
<tr id="i115" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toString-byte:A-int-int-">toString</a></span>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">This method will convert utf8 encoded bytes into a string.</div>
</td>
</tr>
<tr id="i116" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toString-byte:A-java.lang.String-byte:A-">toString</a></span>(byte[]&nbsp;b1,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sep,
byte[]&nbsp;b2)</code>
<div class="block">Joins two byte arrays together using a separator.</div>
</td>
</tr>
<tr id="i117" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toStringBinary-byte:A-">toStringBinary</a></span>(byte[]&nbsp;b)</code>
<div class="block">Write a printable representation of a byte array.</div>
</td>
</tr>
<tr id="i118" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toStringBinary-byte:A-int-int-">toStringBinary</a></span>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</code>
<div class="block">Write a printable representation of a byte array.</div>
</td>
</tr>
<tr id="i119" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toStringBinary-java.nio.ByteBuffer-">toStringBinary</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>
<div class="block">Converts the given byte buffer to a printable representation,
from the index 0 (inclusive) to the limit (exclusive),
regardless of the current position.</div>
</td>
</tr>
<tr id="i120" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#unsignedBinarySearch-byte:A-int-int-byte-">unsignedBinarySearch</a></span>(byte[]&nbsp;a,
int&nbsp;fromIndex,
int&nbsp;toIndex,
byte&nbsp;key)</code>
<div class="block">Search sorted array "a" for byte "key".</div>
</td>
</tr>
<tr id="i121" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#unsignedCopyAndIncrement-byte:A-">unsignedCopyAndIncrement</a></span>(byte[]&nbsp;input)</code>
<div class="block">Treat the byte[] as an unsigned series of bytes, most significant bits first.</div>
</td>
</tr>
<tr id="i122" class="altColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#vintToBytes-long-">vintToBytes</a></span>(long&nbsp;vint)</code>&nbsp;</td>
</tr>
<tr id="i123" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#writeByteArray-byte:A-int-byte:A-int-int-">writeByteArray</a></span>(byte[]&nbsp;tgt,
int&nbsp;tgtOffset,
byte[]&nbsp;src,
int&nbsp;srcOffset,
int&nbsp;srcLength)</code>
<div class="block">Write byte-array from src to tgt with a vint length prefix.</div>
</td>
</tr>
<tr id="i124" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#writeByteArray-java.io.DataOutput-byte:A-">writeByteArray</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
byte[]&nbsp;b)</code>
<div class="block">Write byte-array with a WritableableUtils.vint prefix.</div>
</td>
</tr>
<tr id="i125" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#writeByteArray-java.io.DataOutput-byte:A-int-int-">writeByteArray</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Write byte-array to out with a vint length prefix.</div>
</td>
</tr>
<tr id="i126" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#writeStringFixedSize-java.io.DataOutput-java.lang.String-int-">writeStringFixedSize</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;s,
int&nbsp;size)</code>
<div class="block">Writes a string as a fixed-size field, padded with zeros.</div>
</td>
</tr>
<tr id="i127" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#zero-byte:A-">zero</a></span>(byte[]&nbsp;b)</code>
<div class="block">Fill given array with zeros.</div>
</td>
</tr>
<tr id="i128" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#zero-byte:A-int-int-">zero</a></span>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Fill given array with zeros at the specified position.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="UTF8_CSN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UTF8_CSN</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.66">UTF8_CSN</a></pre>
</li>
</ul>
<a name="EMPTY_BYTE_ARRAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EMPTY_BYTE_ARRAY</h4>
<pre>private static final&nbsp;byte[] <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.69">EMPTY_BYTE_ARRAY</a></pre>
</li>
</ul>
<a name="LOG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOG</h4>
<pre>private static final&nbsp;org.slf4j.Logger <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.71">LOG</a></pre>
</li>
</ul>
<a name="SIZEOF_BOOLEAN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_BOOLEAN</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.76">SIZEOF_BOOLEAN</a></pre>
<div class="block">Size of boolean in bytes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.SIZEOF_BOOLEAN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SIZEOF_BYTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_BYTE</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.81">SIZEOF_BYTE</a></pre>
<div class="block">Size of byte in bytes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.SIZEOF_BYTE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SIZEOF_CHAR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_CHAR</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.86">SIZEOF_CHAR</a></pre>
<div class="block">Size of char in bytes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.SIZEOF_CHAR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SIZEOF_DOUBLE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_DOUBLE</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.91">SIZEOF_DOUBLE</a></pre>
<div class="block">Size of double in bytes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.SIZEOF_DOUBLE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SIZEOF_FLOAT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_FLOAT</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.96">SIZEOF_FLOAT</a></pre>
<div class="block">Size of float in bytes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.SIZEOF_FLOAT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SIZEOF_INT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_INT</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.101">SIZEOF_INT</a></pre>
<div class="block">Size of int in bytes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.SIZEOF_INT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SIZEOF_LONG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_LONG</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.106">SIZEOF_LONG</a></pre>
<div class="block">Size of long in bytes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.SIZEOF_LONG">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="SIZEOF_SHORT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF_SHORT</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.111">SIZEOF_SHORT</a></pre>
<div class="block">Size of short in bytes</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.SIZEOF_SHORT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MASK_FOR_LOWER_INT_IN_LONG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MASK_FOR_LOWER_INT_IN_LONG</h4>
<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.117">MASK_FOR_LOWER_INT_IN_LONG</a></pre>
<div class="block">Mask to apply to a long to reveal the lower int only. Use like this:
int i = (int)(0xFFFFFFFF00000000L ^ some_long_value);</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.MASK_FOR_LOWER_INT_IN_LONG">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ESTIMATED_HEAP_TAX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ESTIMATED_HEAP_TAX</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.125">ESTIMATED_HEAP_TAX</a></pre>
<div class="block">Estimate of size cost to pay beyond payload in jvm for instance of byte [].
Estimate based on study of jhat and jprofiler numbers.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.Bytes.ESTIMATED_HEAP_TAX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="UNSAFE_UNALIGNED">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UNSAFE_UNALIGNED</h4>
<pre>static final&nbsp;boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.127">UNSAFE_UNALIGNED</a></pre>
</li>
</ul>
<a name="bytes">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bytes</h4>
<pre>private&nbsp;byte[] <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.139">bytes</a></pre>
</li>
</ul>
<a name="offset">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offset</h4>
<pre>private&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.140">offset</a></pre>
</li>
</ul>
<a name="length">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>private&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.141">length</a></pre>
</li>
</ul>
<a name="BYTES_COMPARATOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BYTES_COMPARATOR</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a>&lt;byte[]&gt; <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.353">BYTES_COMPARATOR</a></pre>
<div class="block">Pass this to TreeMaps where byte [] are keys.</div>
</li>
</ul>
<a name="BYTES_RAWCOMPARATOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BYTES_RAWCOMPARATOR</h4>
<pre>public static final&nbsp;org.apache.hadoop.io.RawComparator&lt;byte[]&gt; <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.358">BYTES_RAWCOMPARATOR</a></pre>
<div class="block">Use comparing byte arrays, byte-by-byte</div>
</li>
</ul>
<a name="HEX_CHARS_UPPER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HEX_CHARS_UPPER</h4>
<pre>private static final&nbsp;char[] <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.605">HEX_CHARS_UPPER</a></pre>
</li>
</ul>
<a name="RNG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RNG</h4>
<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/security/SecureRandom.html?is-external=true" title="class or interface in java.security">SecureRandom</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2361">RNG</a></pre>
</li>
</ul>
<a name="HEX_CHARS">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>HEX_CHARS</h4>
<pre>private static final&nbsp;char[] <a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2417">HEX_CHARS</a></pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Bytes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Bytes</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.146">Bytes</a>()</pre>
<div class="block">Create a zero-size sequence.</div>
</li>
</ul>
<a name="Bytes-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Bytes</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.154">Bytes</a>(byte[]&nbsp;bytes)</pre>
<div class="block">Create a Bytes using the byte array as the initial value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - This array becomes the backing storage for the object.</dd>
</dl>
</li>
</ul>
<a name="Bytes-org.apache.hadoop.hbase.util.Bytes-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Bytes</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.163">Bytes</a>(<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html" title="class in org.apache.hadoop.hbase.util">Bytes</a>&nbsp;ibw)</pre>
<div class="block">Set the new Bytes to the contents of the passed
<code>ibw</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ibw</code> - the value to set this Bytes to.</dd>
</dl>
</li>
</ul>
<a name="Bytes-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Bytes</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.173">Bytes</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Set the value to a given byte range</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the new byte range to set to</dd>
<dd><code>offset</code> - the offset in newData to start at</dd>
<dd><code>length</code> - the number of bytes in the range</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="len-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>len</h4>
<pre>public static final&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.135">len</a>(byte[]&nbsp;b)</pre>
<div class="block">Returns length of the byte array, returning 0 if the array is null.
Useful for calculating sizes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - byte array, which can be null</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>0 if b is null, otherwise returns length</dd>
</dl>
</li>
</ul>
<a name="get--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>public&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.184">get</a>()</pre>
<div class="block">Get the data from the Bytes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The data is only valid between offset and offset+length.</dd>
</dl>
</li>
</ul>
<a name="set-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.195">set</a>(byte[]&nbsp;b)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - Use passed bytes as backing array for this instance.</dd>
</dl>
</li>
</ul>
<a name="set-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>set</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.204">set</a>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - Use passed bytes as backing array for this instance.</dd>
<dd><code>offset</code> - </dd>
<dd><code>length</code> - </dd>
</dl>
</li>
</ul>
<a name="getLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLength</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.213">getLength</a>()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of valid bytes in the buffer</dd>
</dl>
</li>
</ul>
<a name="getOffset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOffset</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.224">getOffset</a>()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>offset</dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.229">hashCode</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="compareTo-org.apache.hadoop.hbase.util.Bytes-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.240">compareTo</a>(<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html" title="class in org.apache.hadoop.hbase.util">Bytes</a>&nbsp;that)</pre>
<div class="block">Define the sort order of the Bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true#compareTo-T-" title="class or interface in java.lang">compareTo</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html" title="class in org.apache.hadoop.hbase.util">Bytes</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>that</code> - The other bytes writable</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Positive if left is bigger than right, 0 if they are equal, and
negative if left is smaller than right.</dd>
</dl>
</li>
</ul>
<a name="compareTo-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.252">compareTo</a>(byte[]&nbsp;that)</pre>
<div class="block">Compares the bytes in this object to the specified byte array</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>that</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Positive if left is bigger than right, 0 if they are equal, and
negative if left is smaller than right.</dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.262">equals</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;right_obj)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>Object.equals(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.276">toString</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang"><code>Object.toString()</code></a></dd>
</dl>
</li>
</ul>
<a name="toArray-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toArray</h4>
<pre>public static&nbsp;byte[][]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.284">toArray</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;byte[]&gt;&nbsp;array)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - List of byte [].</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Array of byte [].</dd>
</dl>
</li>
</ul>
<a name="copyBytes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyBytes</h4>
<pre>public&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.296">copyBytes</a>()</pre>
<div class="block">Returns a copy of the bytes referred to by this writable</div>
</li>
</ul>
<a name="readByteArray-java.io.DataInput-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.366">readByteArray</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Read byte-array written with a WritableableUtils.vint prefix.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>in</code> - Input to read from.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>byte array read off <code>in</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - e</dd>
</dl>
</li>
</ul>
<a name="readByteArrayThrowsRuntime-java.io.DataInput-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readByteArrayThrowsRuntime</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.383">readByteArrayThrowsRuntime</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in)</pre>
<div class="block">Read byte-array written with a WritableableUtils.vint prefix.
IOException is converted to a RuntimeException.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>in</code> - Input to read from.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>byte array read off <code>in</code></dd>
</dl>
</li>
</ul>
<a name="writeByteArray-java.io.DataOutput-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeByteArray</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.397">writeByteArray</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
byte[]&nbsp;b)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Write byte-array with a WritableableUtils.vint prefix.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - output stream to be written to</dd>
<dd><code>b</code> - array to write</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - e</dd>
</dl>
</li>
</ul>
<a name="writeByteArray-java.io.DataOutput-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeByteArray</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.414">writeByteArray</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Write byte-array to out with a vint length prefix.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - output stream</dd>
<dd><code>b</code> - array</dd>
<dd><code>offset</code> - offset into array</dd>
<dd><code>length</code> - length past offset</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - e</dd>
</dl>
</li>
</ul>
<a name="writeByteArray-byte:A-int-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeByteArray</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.430">writeByteArray</a>(byte[]&nbsp;tgt,
int&nbsp;tgtOffset,
byte[]&nbsp;src,
int&nbsp;srcOffset,
int&nbsp;srcLength)</pre>
<div class="block">Write byte-array from src to tgt with a vint length prefix.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tgt</code> - target array</dd>
<dd><code>tgtOffset</code> - offset into target array</dd>
<dd><code>src</code> - source array</dd>
<dd><code>srcOffset</code> - source offset</dd>
<dd><code>srcLength</code> - source length</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New offset in src array.</dd>
</dl>
</li>
</ul>
<a name="putBytes-byte:A-int-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putBytes</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.448">putBytes</a>(byte[]&nbsp;tgtBytes,
int&nbsp;tgtOffset,
byte[]&nbsp;srcBytes,
int&nbsp;srcOffset,
int&nbsp;srcLength)</pre>
<div class="block">Put bytes at the specified byte array position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tgtBytes</code> - the byte array</dd>
<dd><code>tgtOffset</code> - position in the array</dd>
<dd><code>srcBytes</code> - array to write out</dd>
<dd><code>srcOffset</code> - source offset</dd>
<dd><code>srcLength</code> - source length</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>incremented offset</dd>
</dl>
</li>
</ul>
<a name="putByte-byte:A-int-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putByte</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.461">putByte</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
byte&nbsp;b)</pre>
<div class="block">Write a single byte out to the specified byte array position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array</dd>
<dd><code>offset</code> - position in the array</dd>
<dd><code>b</code> - byte to write out</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>incremented offset</dd>
</dl>
</li>
</ul>
<a name="putByteBuffer-byte:A-int-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putByteBuffer</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.473">putByteBuffer</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<div class="block">Add the whole content of the ByteBuffer to the bytes arrays. The ByteBuffer is modified.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array</dd>
<dd><code>offset</code> - position in the array</dd>
<dd><code>buf</code> - ByteBuffer to write out</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>incremented offset</dd>
</dl>
</li>
</ul>
<a name="toBytes-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.489">toBytes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<div class="block">Returns a new byte array, copied from the given <code>buf</code>,
from the index 0 (inclusive) to the limit (exclusive),
regardless of the current position.
The position and the other index parameters are not changed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buf</code> - a byte buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the byte array</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#getBytes-java.nio.ByteBuffer-"><code>getBytes(ByteBuffer)</code></a></dd>
</dl>
</li>
</ul>
<a name="readBytes-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBytes</h4>
<pre>private static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.495">readBytes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
</li>
</ul>
<a name="toString-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.505">toString</a>(byte[]&nbsp;b)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - Presumed UTF-8 encoded byte array.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String made from <code>b</code></dd>
</dl>
</li>
</ul>
<a name="toString-byte:A-java.lang.String-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.518">toString</a>(byte[]&nbsp;b1,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sep,
byte[]&nbsp;b2)</pre>
<div class="block">Joins two byte arrays together using a separator.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b1</code> - The first byte array.</dd>
<dd><code>sep</code> - The separator to use.</dd>
<dd><code>b2</code> - The second byte array.</dd>
</dl>
</li>
</ul>
<a name="toString-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.532">toString</a>(byte[]&nbsp;b,
int&nbsp;off)</pre>
<div class="block">This method will convert utf8 encoded bytes into a string. If
the given byte array is null, this method will return null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - Presumed UTF-8 encoded byte array.</dd>
<dd><code>off</code> - offset into array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String made from <code>b</code> or null</dd>
</dl>
</li>
</ul>
<a name="toString-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.557">toString</a>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</pre>
<div class="block">This method will convert utf8 encoded bytes into a string. If
the given byte array is null, this method will return null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - Presumed UTF-8 encoded byte array.</dd>
<dd><code>off</code> - offset into array</dd>
<dd><code>len</code> - length of utf-8 sequence</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String made from <code>b</code> or null</dd>
</dl>
</li>
</ul>
<a name="toStringBinary-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toStringBinary</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.579">toStringBinary</a>(byte[]&nbsp;b)</pre>
<div class="block">Write a printable representation of a byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>string</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toStringBinary-byte:A-int-int-"><code>toStringBinary(byte[], int, int)</code></a></dd>
</dl>
</li>
</ul>
<a name="toStringBinary-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toStringBinary</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.596">toStringBinary</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<div class="block">Converts the given byte buffer to a printable representation,
from the index 0 (inclusive) to the limit (exclusive),
regardless of the current position.
The position and the other index parameters are not changed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buf</code> - a byte buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a string representation of the buffer's binary contents</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-java.nio.ByteBuffer-"><code>toBytes(ByteBuffer)</code></a>,
<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#getBytes-java.nio.ByteBuffer-"><code>getBytes(ByteBuffer)</code></a></dd>
</dl>
</li>
</ul>
<a name="toStringBinary-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toStringBinary</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.619">toStringBinary</a>(byte[]&nbsp;b,
int&nbsp;off,
int&nbsp;len)</pre>
<div class="block">Write a printable representation of a byte array. Non-printable
characters are hex escaped in the format \\x%02X, eg:
\x00 \x05 etc</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - array to write out</dd>
<dd><code>off</code> - offset to start at</dd>
<dd><code>len</code> - length to write</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>string output</dd>
</dl>
</li>
</ul>
<a name="isHexDigit-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isHexDigit</h4>
<pre>private static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.637">isHexDigit</a>(char&nbsp;c)</pre>
</li>
</ul>
<a name="toBinaryFromHex-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBinaryFromHex</h4>
<pre>public static&nbsp;byte&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.649">toBinaryFromHex</a>(byte&nbsp;ch)</pre>
<div class="block">Takes a ASCII digit in the range A-F0-9 and returns
the corresponding integer/ordinal value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ch</code> - The hex digit.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The converted hex value as a byte.</dd>
</dl>
</li>
</ul>
<a name="toBytesBinary-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytesBinary</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.656">toBytesBinary</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;in)</pre>
</li>
</ul>
<a name="toBytes-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.693">toBytes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;s)</pre>
<div class="block">Converts a string to a UTF-8 byte array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>s</code> - string</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the byte array</dd>
</dl>
</li>
</ul>
<a name="toBytes-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.709">toBytes</a>(boolean&nbsp;b)</pre>
<div class="block">Convert a boolean to a byte array. True becomes -1
and false becomes 0.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>b</code> encoded in a byte array.</dd>
</dl>
</li>
</ul>
<a name="toBoolean-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBoolean</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.718">toBoolean</a>(byte[]&nbsp;b)</pre>
<div class="block">Reverses <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-boolean-"><code>toBytes(boolean)</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True or false.</dd>
</dl>
</li>
</ul>
<a name="toBytes-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.731">toBytes</a>(long&nbsp;val)</pre>
<div class="block">Convert a long value to a byte array using big-endian.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>val</code> - value to convert</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the byte array</dd>
</dl>
</li>
</ul>
<a name="toLong-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLong</h4>
<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.747">toLong</a>(byte[]&nbsp;bytes)</pre>
<div class="block">Converts a byte array to a long value. Reverses
<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-long-"><code>toBytes(long)</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the long value</dd>
</dl>
</li>
</ul>
<a name="toLong-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLong</h4>
<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.759">toLong</a>(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<div class="block">Converts a byte array to a long value. Assumes there will be
<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_LONG"><code>SIZEOF_LONG</code></a> bytes available.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - bytes</dd>
<dd><code>offset</code> - offset</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the long value</dd>
</dl>
</li>
</ul>
<a name="toLong-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLong</h4>
<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.773">toLong</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to a long value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - array of bytes</dd>
<dd><code>offset</code> - offset into array</dd>
<dd><code>length</code> - length of data (must be <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_LONG"><code>SIZEOF_LONG</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the long value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is not <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_LONG"><code>SIZEOF_LONG</code></a> or
if there's not enough room in the array at the offset indicated.</dd>
</dl>
</li>
</ul>
<a name="explainWrongLengthOrOffset-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>explainWrongLengthOrOffset</h4>
<pre>private static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.781">explainWrongLengthOrOffset</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;expectedLength)</pre>
</li>
</ul>
<a name="putLong-byte:A-int-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putLong</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.804">putLong</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
long&nbsp;val)</pre>
<div class="block">Put a long value out to the specified byte array position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array</dd>
<dd><code>offset</code> - position in the array</dd>
<dd><code>val</code> - long to write out</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>incremented offset</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the byte array given doesn't have
enough room at the offset specified.</dd>
</dl>
</li>
</ul>
<a name="toFloat-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toFloat</h4>
<pre>public static&nbsp;float&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.817">toFloat</a>(byte[]&nbsp;bytes)</pre>
<div class="block">Presumes float encoded as IEEE 754 floating-point "single format"</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Float made from passed byte array.</dd>
</dl>
</li>
</ul>
<a name="toFloat-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toFloat</h4>
<pre>public static&nbsp;float&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.827">toFloat</a>(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<div class="block">Presumes float encoded as IEEE 754 floating-point "single format"</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - array to convert</dd>
<dd><code>offset</code> - offset into array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Float made from passed byte array.</dd>
</dl>
</li>
</ul>
<a name="putFloat-byte:A-int-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putFloat</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.837">putFloat</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
float&nbsp;f)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dd><code>offset</code> - offset to write to</dd>
<dd><code>f</code> - float value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New offset in <code>bytes</code></dd>
</dl>
</li>
</ul>
<a name="toBytes-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.845">toBytes</a>(float&nbsp;f)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>f</code> - float value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the float represented as byte []</dd>
</dl>
</li>
</ul>
<a name="toDouble-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDouble</h4>
<pre>public static&nbsp;double&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.854">toDouble</a>(byte[]&nbsp;bytes)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Return double made from passed bytes.</dd>
</dl>
</li>
</ul>
<a name="toDouble-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDouble</h4>
<pre>public static&nbsp;double&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.863">toDouble</a>(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dd><code>offset</code> - offset where double is</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Return double made from passed bytes.</dd>
</dl>
</li>
</ul>
<a name="putDouble-byte:A-int-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putDouble</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.873">putDouble</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
double&nbsp;d)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dd><code>offset</code> - offset to write to</dd>
<dd><code>d</code> - value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New offset into array <code>bytes</code></dd>
</dl>
</li>
</ul>
<a name="toBytes-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.884">toBytes</a>(double&nbsp;d)</pre>
<div class="block">Serialize a double as the IEEE 754 double format output. The resultant
array will be 8 bytes long.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>d</code> - value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the double represented as byte []</dd>
</dl>
</li>
</ul>
<a name="toBytes-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.896">toBytes</a>(int&nbsp;val)</pre>
<div class="block">Convert an int value to a byte array. Big-endian. Same as what DataOutputStream.writeInt
does.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>val</code> - value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the byte array</dd>
</dl>
</li>
</ul>
<a name="toInt-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInt</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.911">toInt</a>(byte[]&nbsp;bytes)</pre>
<div class="block">Converts a byte array to an int value</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the int value</dd>
</dl>
</li>
</ul>
<a name="toInt-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInt</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.921">toInt</a>(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<div class="block">Converts a byte array to an int value</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dd><code>offset</code> - offset into array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the int value</dd>
</dl>
</li>
</ul>
<a name="toInt-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toInt</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.934">toInt</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to an int value</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dd><code>offset</code> - offset into array</dd>
<dd><code>length</code> - length of int (has to be <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_INT"><code>SIZEOF_INT</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the int value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is not <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_INT"><code>SIZEOF_INT</code></a> or
if there's not enough room in the array at the offset indicated.</dd>
</dl>
</li>
</ul>
<a name="readAsInt-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readAsInt</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.950">readAsInt</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to an int value</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dd><code>offset</code> - offset into array</dd>
<dd><code>length</code> - how many bytes should be considered for creating int</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the int value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if there's not enough room in the array at the offset
indicated.</dd>
</dl>
</li>
</ul>
<a name="putInt-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putInt</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.972">putInt</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;val)</pre>
<div class="block">Put an int value out to the specified byte array position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array</dd>
<dd><code>offset</code> - position in the array</dd>
<dd><code>val</code> - int to write out</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>incremented offset</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the byte array given doesn't have
enough room at the offset specified.</dd>
</dl>
</li>
</ul>
<a name="toBytes-short-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.985">toBytes</a>(short&nbsp;val)</pre>
<div class="block">Convert a short value to a byte array of <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_SHORT"><code>SIZEOF_SHORT</code></a> bytes long.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>val</code> - value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the byte array</dd>
</dl>
</li>
</ul>
<a name="toShort-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toShort</h4>
<pre>public static&nbsp;short&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.998">toShort</a>(byte[]&nbsp;bytes)</pre>
<div class="block">Converts a byte array to a short value</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the short value</dd>
</dl>
</li>
</ul>
<a name="toShort-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toShort</h4>
<pre>public static&nbsp;short&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1008">toShort</a>(byte[]&nbsp;bytes,
int&nbsp;offset)</pre>
<div class="block">Converts a byte array to a short value</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dd><code>offset</code> - offset into array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the short value</dd>
</dl>
</li>
</ul>
<a name="toShort-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toShort</h4>
<pre>public static&nbsp;short&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1021">toShort</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to a short value</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - byte array</dd>
<dd><code>offset</code> - offset into array</dd>
<dd><code>length</code> - length, has to be <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_SHORT"><code>SIZEOF_SHORT</code></a></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the short value</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if length is not <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#SIZEOF_SHORT"><code>SIZEOF_SHORT</code></a>
or if there's not enough room in the array at the offset indicated.</dd>
</dl>
</li>
</ul>
<a name="getBytes-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1037">getBytes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<div class="block">Returns a new byte array, copied from the given <code>buf</code>,
from the position (inclusive) to the limit (exclusive).
The position and the other index parameters are not changed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buf</code> - a byte buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the byte array</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html#toBytes-java.nio.ByteBuffer-"><code>toBytes(ByteBuffer)</code></a></dd>
</dl>
</li>
</ul>
<a name="putShort-byte:A-int-short-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putShort</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1050">putShort</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
short&nbsp;val)</pre>
<div class="block">Put a short value out to the specified byte array position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array</dd>
<dd><code>offset</code> - position in the array</dd>
<dd><code>val</code> - short to write out</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>incremented offset</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the byte array given doesn't have
enough room at the offset specified.</dd>
</dl>
</li>
</ul>
<a name="putAsShort-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putAsShort</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1070">putAsShort</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;val)</pre>
<div class="block">Put an int value as short out to the specified byte array position. Only the lower 2 bytes of
the short will be put into the array. The caller of the API need to make sure they will not
loose the value by doing so. This is useful to store an unsigned short which is represented as
int in other parts.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array</dd>
<dd><code>offset</code> - position in the array</dd>
<dd><code>val</code> - value to write out</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>incremented offset</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the byte array given doesn't have
enough room at the offset specified.</dd>
</dl>
</li>
</ul>
<a name="toBytes-java.math.BigDecimal-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1087">toBytes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;val)</pre>
<div class="block">Convert a BigDecimal value to a byte array</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>val</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the byte array</dd>
</dl>
</li>
</ul>
<a name="toBigDecimal-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBigDecimal</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1102">toBigDecimal</a>(byte[]&nbsp;bytes)</pre>
<div class="block">Converts a byte array to a BigDecimal</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the char value</dd>
</dl>
</li>
</ul>
<a name="toBigDecimal-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBigDecimal</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1114">toBigDecimal</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Converts a byte array to a BigDecimal value</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - </dd>
<dd><code>offset</code> - </dd>
<dd><code>length</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the char value</dd>
</dl>
</li>
</ul>
<a name="putBigDecimal-byte:A-int-java.math.BigDecimal-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putBigDecimal</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1134">putBigDecimal</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a>&nbsp;val)</pre>
<div class="block">Put a BigDecimal value out to the specified byte array position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array</dd>
<dd><code>offset</code> - position in the array</dd>
<dd><code>val</code> - BigDecimal to write out</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>incremented offset</dd>
</dl>
</li>
</ul>
<a name="vintToBytes-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vintToBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1149">vintToBytes</a>(long&nbsp;vint)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>vint</code> - Integer to make a vint of.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Vint as bytes array.</dd>
</dl>
</li>
</ul>
<a name="bytesToVint-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bytesToVint</h4>
<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1187">bytesToVint</a>(byte[]&nbsp;buffer)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - buffer to convert</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>vint bytes as an integer.</dd>
</dl>
</li>
</ul>
<a name="readAsVLong-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readAsVLong</h4>
<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1209">readAsVLong</a>(byte[]&nbsp;buffer,
int&nbsp;offset)</pre>
<div class="block">Reads a zero-compressed encoded long from input buffer and returns it.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer</code> - Binary array</dd>
<dd><code>offset</code> - Offset into array at which vint begins.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>deserialized long from buffer.</dd>
</dl>
</li>
</ul>
<a name="compareTo-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1229">compareTo</a>(byte[]&nbsp;left,
byte[]&nbsp;right)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>left</code> - left operand</dd>
<dd><code>right</code> - right operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>0 if equal, &lt; 0 if left is less than right, etc.</dd>
</dl>
</li>
</ul>
<a name="compareTo-byte:A-int-int-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1245">compareTo</a>(byte[]&nbsp;buffer1,
int&nbsp;offset1,
int&nbsp;length1,
byte[]&nbsp;buffer2,
int&nbsp;offset2,
int&nbsp;length2)</pre>
<div class="block">Lexicographically compare two arrays.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>buffer1</code> - left operand</dd>
<dd><code>buffer2</code> - right operand</dd>
<dd><code>offset1</code> - Where to start comparing in the left buffer</dd>
<dd><code>offset2</code> - Where to start comparing in the right buffer</dd>
<dd><code>length1</code> - How much to compare from the left buffer</dd>
<dd><code>length2</code> - How much to compare from the right buffer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>0 if equal, &lt; 0 if left is less than right, etc.</dd>
</dl>
</li>
</ul>
<a name="lexicographicalComparerJavaImpl--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lexicographicalComparerJavaImpl</h4>
<pre>static&nbsp;<a href="../../../../../org/apache/hadoop/hbase/util/Bytes.Comparer.html" title="interface in org.apache.hadoop.hbase.util">Bytes.Comparer</a>&lt;byte[]&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1269">lexicographicalComparerJavaImpl</a>()</pre>
</li>
</ul>
<a name="equals-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1557">equals</a>(byte[]&nbsp;left,
byte[]&nbsp;right)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>left</code> - left operand</dd>
<dd><code>right</code> - right operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if equal</dd>
</dl>
</li>
</ul>
<a name="equals-byte:A-int-int-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1573">equals</a>(byte[]&nbsp;left,
int&nbsp;leftOffset,
int&nbsp;leftLen,
byte[]&nbsp;right,
int&nbsp;rightOffset,
int&nbsp;rightLen)</pre>
</li>
</ul>
<a name="equals-byte:A-java.nio.ByteBuffer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1604">equals</a>(byte[]&nbsp;a,
<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - left operand</dd>
<dd><code>buf</code> - right operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if equal</dd>
</dl>
</li>
</ul>
<a name="startsWith-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startsWith</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1624">startsWith</a>(byte[]&nbsp;bytes,
byte[]&nbsp;prefix)</pre>
<div class="block">Return true if the byte array on the right is a prefix of the byte
array on the left.</div>
</li>
</ul>
<a name="hashCode-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1637">hashCode</a>(byte[]&nbsp;b)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - bytes to hash</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Runs <code>WritableComparator.hashBytes(byte[], int)</code> on the
passed in array. This method is what <code>Text</code>
use calculating hash code.</dd>
</dl>
</li>
</ul>
<a name="hashCode-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1648">hashCode</a>(byte[]&nbsp;b,
int&nbsp;length)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - value</dd>
<dd><code>length</code> - length of the value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Runs <code>WritableComparator.hashBytes(byte[], int)</code> on the
passed in array. This method is what <code>Text</code>
use calculating hash code.</dd>
</dl>
</li>
</ul>
<a name="mapKey-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mapKey</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1657">mapKey</a>(byte[]&nbsp;b)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - bytes to hash</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A hash of <code>b</code> as an Integer that can be used as key in
Maps.</dd>
</dl>
</li>
</ul>
<a name="mapKey-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mapKey</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1667">mapKey</a>(byte[]&nbsp;b,
int&nbsp;length)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - bytes to hash</dd>
<dd><code>length</code> - length to hash</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A hash of <code>b</code> as an Integer that can be used as key in
Maps.</dd>
</dl>
</li>
</ul>
<a name="add-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1676">add</a>(byte[]&nbsp;a,
byte[]&nbsp;b)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - lower half</dd>
<dd><code>b</code> - upper half</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New array that has a in lower half and b in upper half.</dd>
</dl>
</li>
</ul>
<a name="add-byte:A-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1686">add</a>(byte[]&nbsp;a,
byte[]&nbsp;b,
byte[]&nbsp;c)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - first third</dd>
<dd><code>b</code> - second third</dd>
<dd><code>c</code> - third third</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New array made from a, b and c</dd>
</dl>
</li>
</ul>
<a name="add-byte:A:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1698">add</a>(byte[][]&nbsp;arrays)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arrays</code> - all the arrays to concatenate together.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>New array made from the concatenation of the given arrays.</dd>
</dl>
</li>
</ul>
<a name="head-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>head</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1717">head</a>(byte[]&nbsp;a,
int&nbsp;length)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - array</dd>
<dd><code>length</code> - amount of bytes to grab</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>First <code>length</code> bytes from <code>a</code></dd>
</dl>
</li>
</ul>
<a name="tail-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tail</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1731">tail</a>(byte[]&nbsp;a,
int&nbsp;length)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - array</dd>
<dd><code>length</code> - amount of bytes to snarf</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Last <code>length</code> bytes from <code>a</code></dd>
</dl>
</li>
</ul>
<a name="padHead-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>padHead</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1745">padHead</a>(byte[]&nbsp;a,
int&nbsp;length)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - array</dd>
<dd><code>length</code> - new array size</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Value in <code>a</code> plus <code>length</code> prepended 0 bytes</dd>
</dl>
</li>
</ul>
<a name="padTail-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>padTail</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1758">padTail</a>(byte[]&nbsp;a,
int&nbsp;length)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - array</dd>
<dd><code>length</code> - new array size</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Value in <code>a</code> plus <code>length</code> appended 0 bytes</dd>
</dl>
</li>
</ul>
<a name="split-byte:A-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>public static&nbsp;byte[][]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1775">split</a>(byte[]&nbsp;a,
byte[]&nbsp;b,
int&nbsp;num)</pre>
<div class="block">Split passed range. Expensive operation relatively. Uses BigInteger math.
Useful splitting ranges for MapReduce jobs.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - Beginning of range</dd>
<dd><code>b</code> - End of range</dd>
<dd><code>num</code> - Number of times to split range. Pass 1 if you want to split
the range in two; i.e. one split.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Array of dividing values</dd>
</dl>
</li>
</ul>
<a name="split-byte:A-byte:A-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>split</h4>
<pre>public static&nbsp;byte[][]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1791">split</a>(byte[]&nbsp;a,
byte[]&nbsp;b,
boolean&nbsp;inclusive,
int&nbsp;num)</pre>
<div class="block">Split passed range. Expensive operation relatively. Uses BigInteger math.
Useful splitting ranges for MapReduce jobs.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - Beginning of range</dd>
<dd><code>b</code> - End of range</dd>
<dd><code>inclusive</code> - Whether the end of range is prefix-inclusive or is
considered an exclusive boundary. Automatic splits are generally exclusive
and manual splits with an explicit range utilize an inclusive end of range.</dd>
<dd><code>num</code> - Number of times to split range. Pass 1 if you want to split
the range in two; i.e. one split.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Array of dividing values</dd>
</dl>
</li>
</ul>
<a name="iterateOnSplits-byte:A-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterateOnSplits</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;byte[]&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1807">iterateOnSplits</a>(byte[]&nbsp;a,
byte[]&nbsp;b,
int&nbsp;num)</pre>
<div class="block">Iterate over keys within the passed range, splitting at an [a,b) boundary.</div>
</li>
</ul>
<a name="iterateOnSplits-byte:A-byte:A-boolean-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterateOnSplits</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;byte[]&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1816">iterateOnSplits</a>(byte[]&nbsp;a,
byte[]&nbsp;b,
boolean&nbsp;inclusive,
int&nbsp;num)</pre>
<div class="block">Iterate over keys within the passed range.</div>
</li>
</ul>
<a name="hashCode-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1910">hashCode</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - array to hash</dd>
<dd><code>offset</code> - offset to start from</dd>
<dd><code>length</code> - length to hash</dd>
</dl>
</li>
</ul>
<a name="toByteArrays-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArrays</h4>
<pre>public static&nbsp;byte[][]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1921">toByteArrays</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;t)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>t</code> - operands</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Array of byte arrays made from passed array of Text</dd>
</dl>
</li>
</ul>
<a name="toBinaryByteArrays-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBinaryByteArrays</h4>
<pre>public static&nbsp;byte[][]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1933">toBinaryByteArrays</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;t)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>t</code> - operands</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Array of binary byte arrays made from passed array of binary strings</dd>
</dl>
</li>
</ul>
<a name="toByteArrays-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArrays</h4>
<pre>public static&nbsp;byte[][]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1946">toByteArrays</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;column)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>column</code> - operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A byte array of a byte array where first and only entry is
<code>column</code></dd>
</dl>
</li>
</ul>
<a name="toByteArrays-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toByteArrays</h4>
<pre>public static&nbsp;byte[][]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1955">toByteArrays</a>(byte[]&nbsp;column)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>column</code> - operand</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A byte array of a byte array where first and only entry is
<code>column</code></dd>
</dl>
</li>
</ul>
<a name="binarySearch-byte:A:A-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binarySearch</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.1975">binarySearch</a>(byte[][]&nbsp;arr,
byte[]&nbsp;key,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Binary search for keys in indexes using Bytes.BYTES_RAWCOMPARATOR.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - array of byte arrays to search for</dd>
<dd><code>key</code> - the key you want to find</dd>
<dd><code>offset</code> - the offset in the key you want to find</dd>
<dd><code>length</code> - the length of the key</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>zero-based index of the key, if the key is present in the array.
Otherwise, a value -(i + 1) such that the key is between arr[i -
1] and arr[i] non-inclusively, where i is in [0, i], if we define
arr[-1] = -Inf and arr[N] = Inf for an N-element array. The above
means that this function can return 2N + 1 different values
ranging from -(N + 1) to N - 1.</dd>
</dl>
</li>
</ul>
<a name="binarySearch-org.apache.hadoop.hbase.Cell:A-org.apache.hadoop.hbase.Cell-org.apache.hadoop.hbase.CellComparator-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binarySearch</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2012">binarySearch</a>(<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>[]&nbsp;arr,
<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;key,
<a href="../../../../../org/apache/hadoop/hbase/CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comparator)</pre>
<div class="block">Binary search for keys in indexes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>arr</code> - array of byte arrays to search for</dd>
<dd><code>key</code> - the key you want to find</dd>
<dd><code>comparator</code> - a comparator to compare.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>zero-based index of the key, if the key is present in the array.
Otherwise, a value -(i + 1) such that the key is between arr[i -
1] and arr[i] non-inclusively, where i is in [0, i], if we define
arr[-1] = -Inf and arr[N] = Inf for an N-element array. The above
means that this function can return 2N + 1 different values
ranging from -(N + 1) to N - 1.</dd>
</dl>
</li>
</ul>
<a name="incrementBytes-byte:A-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>incrementBytes</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2041">incrementBytes</a>(byte[]&nbsp;value,
long&nbsp;amount)</pre>
<div class="block">Bytewise binary increment/deincrement of long contained in byte array
on given amount.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - - array of bytes containing long (length &lt;= SIZEOF_LONG)</dd>
<dd><code>amount</code> - value will be incremented on (deincremented if negative)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>array of bytes containing incremented long (length == SIZEOF_LONG)</dd>
</dl>
</li>
</ul>
<a name="binaryIncrementPos-byte:A-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binaryIncrementPos</h4>
<pre>private static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2067">binaryIncrementPos</a>(byte[]&nbsp;value,
long&nbsp;amount)</pre>
</li>
</ul>
<a name="binaryIncrementNeg-byte:A-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>binaryIncrementNeg</h4>
<pre>private static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2092">binaryIncrementNeg</a>(byte[]&nbsp;value,
long&nbsp;amount)</pre>
</li>
</ul>
<a name="writeStringFixedSize-java.io.DataOutput-java.lang.String-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeStringFixedSize</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2119">writeStringFixedSize</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a>&nbsp;out,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;s,
int&nbsp;size)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Writes a string as a fixed-size field, padded with zeros.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="readStringFixedSize-java.io.DataInput-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readStringFixedSize</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2135">readStringFixedSize</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</a>&nbsp;in,
int&nbsp;size)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads a fixed-size field and interprets it as a string padded with zeros.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="copy-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2152">copy</a>(byte[]&nbsp;bytes)</pre>
<div class="block">Copy the byte array given in parameter and return an instance
of a new byte array with the same length and the same content.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array to duplicate</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a copy of the given byte array</dd>
</dl>
</li>
</ul>
<a name="copy-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2167">copy</a>(byte[]&nbsp;bytes,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Copy the byte array given in parameter and return an instance
of a new byte array with the same length and the same content.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the byte array to copy from</dd>
<dd><code>offset</code> - </dd>
<dd><code>length</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a copy of the given designated byte array</dd>
</dl>
</li>
</ul>
<a name="unsignedBinarySearch-byte:A-int-int-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unsignedBinarySearch</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2184">unsignedBinarySearch</a>(byte[]&nbsp;a,
int&nbsp;fromIndex,
int&nbsp;toIndex,
byte&nbsp;key)</pre>
<div class="block">Search sorted array "a" for byte "key". I can't remember if I wrote this or copied it from
somewhere. (mcorgan)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - Array to search. Entries must be sorted and unique.</dd>
<dd><code>fromIndex</code> - First index inclusive of "a" to include in the search.</dd>
<dd><code>toIndex</code> - Last index exclusive of "a" to include in the search.</dd>
<dd><code>key</code> - The byte to search for.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The index of key if found. If not found, return -(index + 1), where negative indicates
"not found" and the "index + 1" handles the "-0" case.</dd>
</dl>
</li>
</ul>
<a name="unsignedCopyAndIncrement-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unsignedCopyAndIncrement</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2211">unsignedCopyAndIncrement</a>(byte[]&nbsp;input)</pre>
<div class="block">Treat the byte[] as an unsigned series of bytes, most significant bits first. Start by adding
1 to the rightmost bit/byte and carry over all overflows to the more significant bits/bytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>input</code> - The byte[] to increment.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The incremented copy of "in". May be same length or 1 byte longer.</dd>
</dl>
</li>
</ul>
<a name="equals-java.util.List-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2231">equals</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;byte[]&gt;&nbsp;a,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;byte[]&gt;&nbsp;b)</pre>
</li>
</ul>
<a name="isSorted-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSorted</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2252">isSorted</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;byte[]&gt;&nbsp;arrays)</pre>
</li>
</ul>
<a name="getUtf8ByteArrays-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUtf8ByteArrays</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;byte[]&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2265">getUtf8ByteArrays</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;strings)</pre>
</li>
</ul>
<a name="indexOf-byte:A-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexOf</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2283">indexOf</a>(byte[]&nbsp;array,
byte&nbsp;target)</pre>
<div class="block">Returns the index of the first appearance of the value <code>target</code> in
<code>array</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - an array of <code>byte</code> values, possibly empty</dd>
<dd><code>target</code> - a primitive <code>byte</code> value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the least index <code>i</code> for which <code>array[i] == target</code>, or
<code>-1</code> if no such index exists.</dd>
</dl>
</li>
</ul>
<a name="indexOf-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexOf</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2303">indexOf</a>(byte[]&nbsp;array,
byte[]&nbsp;target)</pre>
<div class="block">Returns the start position of the first occurrence of the specified <code>target</code> within <code>array</code>, or <code>-1</code> if there is no such occurrence.
<p>More formally, returns the lowest index <code>i</code> such that <code>java.util.Arrays.copyOfRange(array, i, i + target.length)</code> contains exactly
the same elements as <code>target</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - the array to search for the sequence <code>target</code></dd>
<dd><code>target</code> - the array to search for as a sub-sequence of <code>array</code></dd>
</dl>
</li>
</ul>
<a name="contains-byte:A-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2327">contains</a>(byte[]&nbsp;array,
byte&nbsp;target)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - an array of <code>byte</code> values, possibly empty</dd>
<dd><code>target</code> - a primitive <code>byte</code> value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if <code>target</code> is present as an element anywhere in <code>array</code>.</dd>
</dl>
</li>
</ul>
<a name="contains-byte:A-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2336">contains</a>(byte[]&nbsp;array,
byte[]&nbsp;target)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>array</code> - an array of <code>byte</code> values, possibly empty</dd>
<dd><code>target</code> - an array of <code>byte</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if <code>target</code> is present anywhere in <code>array</code></dd>
</dl>
</li>
</ul>
<a name="zero-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>zero</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2344">zero</a>(byte[]&nbsp;b)</pre>
<div class="block">Fill given array with zeros.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - array which needs to be filled with zeros</dd>
</dl>
</li>
</ul>
<a name="zero-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>zero</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2354">zero</a>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Fill given array with zeros at the specified position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - </dd>
<dd><code>offset</code> - </dd>
<dd><code>length</code> - </dd>
</dl>
</li>
</ul>
<a name="random-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>random</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2367">random</a>(byte[]&nbsp;b)</pre>
<div class="block">Fill given array with random bytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - array which needs to be filled with random bytes</dd>
</dl>
</li>
</ul>
<a name="random-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>random</h4>
<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2377">random</a>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Fill given array with random bytes at the specified position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - </dd>
<dd><code>offset</code> - </dd>
<dd><code>length</code> - </dd>
</dl>
</li>
</ul>
<a name="createMaxByteArray-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMaxByteArray</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2391">createMaxByteArray</a>(int&nbsp;maxByteCount)</pre>
<div class="block">Create a max byte array with the specified max byte count</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxByteCount</code> - the length of returned byte array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the created max byte array</dd>
</dl>
</li>
</ul>
<a name="multiple-byte:A-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiple</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2405">multiple</a>(byte[]&nbsp;srcBytes,
int&nbsp;multiNum)</pre>
<div class="block">Create a byte array which is multiple given bytes</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcBytes</code> - </dd>
<dd><code>multiNum</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>byte array</dd>
</dl>
</li>
</ul>
<a name="toHex-byte:A-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toHex</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2424">toHex</a>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</pre>
<div class="block">Convert a byte range into a hex string</div>
</li>
</ul>
<a name="toHex-byte:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toHex</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2440">toHex</a>(byte[]&nbsp;b)</pre>
<div class="block">Convert a byte array into a hex string</div>
</li>
</ul>
<a name="hexCharToNibble-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hexCharToNibble</h4>
<pre>private static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2444">hexCharToNibble</a>(char&nbsp;ch)</pre>
</li>
</ul>
<a name="hexCharsToByte-char-char-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hexCharsToByte</h4>
<pre>private static&nbsp;byte&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2455">hexCharsToByte</a>(char&nbsp;c1,
char&nbsp;c2)</pre>
</li>
</ul>
<a name="fromHex-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromHex</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2464">fromHex</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hex)</pre>
<div class="block">Create a byte array from a string of hash digits. The length of the
string must be a multiple of 2</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>hex</code> - </dd>
</dl>
</li>
</ul>
<a name="searchDelimiterIndex-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>searchDelimiterIndex</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2479">searchDelimiterIndex</a>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;delimiter)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - </dd>
<dd><code>delimiter</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Index of delimiter having started from start of <code>b</code> moving rightward.</dd>
</dl>
</li>
</ul>
<a name="searchDelimiterIndexInReverse-byte:A-int-int-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>searchDelimiterIndexInReverse</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2501">searchDelimiterIndexInReverse</a>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length,
int&nbsp;delimiter)</pre>
<div class="block">Find index of passed delimiter walking from end of buffer backwards.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>b</code> - </dd>
<dd><code>delimiter</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Index of delimiter</dd>
</dl>
</li>
</ul>
<a name="findCommonPrefix-byte:A-byte:A-int-int-int-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>findCommonPrefix</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/Bytes.html#line.2516">findCommonPrefix</a>(byte[]&nbsp;left,
byte[]&nbsp;right,
int&nbsp;leftLength,
int&nbsp;rightLength,
int&nbsp;leftOffset,
int&nbsp;rightOffset)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Bytes.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">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/hadoop/hbase/util/ByteRangeUtils.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/hbase/util/Bytes.ByteArrayComparator.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/hadoop/hbase/util/Bytes.html" target="_top">Frames</a></li>
<li><a href="Bytes.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<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="subNavList">
<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>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2007&#x2013;2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>