blob: 1006b8e873101473ecdd017579584d44fbfb9bab [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>OrderedBytes (Apache HBase 3.0.0-beta-1-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="OrderedBytes (Apache HBase 3.0.0-beta-1-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"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};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/OrderedBytes.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/Order.html" title="enum in org.apache.hadoop.hbase.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/hbase/util/Pair.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/OrderedBytes.html" target="_top">Frames</a></li>
<li><a href="OrderedBytes.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>Nested&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 OrderedBytes" class="title">Class OrderedBytes</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.OrderedBytes</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>@InterfaceAudience.Public
public class <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.297">OrderedBytes</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></pre>
<div class="block">Utility class that handles ordered byte arrays. That is, unlike <a href="../../../../../org/apache/hadoop/hbase/util/Bytes.html" title="class in org.apache.hadoop.hbase.util"><code>Bytes</code></a>, these methods
produce byte arrays which maintain the sort order of the original values.
<h3>Encoding Format summary</h3>
<p>
Each value is encoded as one or more bytes. The first byte of the encoding, its meaning, and a
terse description of the bytes that follow is given by the following table:
</p>
<table summary="Encodings">
<tr>
<th>Content Type</th>
<th>Encoding</th>
</tr>
<tr>
<td>NULL</td>
<td>0x05</td>
</tr>
<tr>
<td>negative infinity</td>
<td>0x07</td>
</tr>
<tr>
<td>negative large</td>
<td>0x08, ~E, ~M</td>
</tr>
<tr>
<td>negative medium</td>
<td>0x13-E, ~M</td>
</tr>
<tr>
<td>negative small</td>
<td>0x14, -E, ~M</td>
</tr>
<tr>
<td>zero</td>
<td>0x15</td>
</tr>
<tr>
<td>positive small</td>
<td>0x16, ~-E, M</td>
</tr>
<tr>
<td>positive medium</td>
<td>0x17+E, M</td>
</tr>
<tr>
<td>positive large</td>
<td>0x22, E, M</td>
</tr>
<tr>
<td>positive infinity</td>
<td>0x23</td>
</tr>
<tr>
<td>NaN</td>
<td>0x25</td>
</tr>
<tr>
<td>fixed-length 32-bit integer</td>
<td>0x27, I</td>
</tr>
<tr>
<td>fixed-length 64-bit integer</td>
<td>0x28, I</td>
</tr>
<tr>
<td>fixed-length 8-bit integer</td>
<td>0x29</td>
</tr>
<tr>
<td>fixed-length 16-bit integer</td>
<td>0x2a</td>
</tr>
<tr>
<td>fixed-length 32-bit float</td>
<td>0x30, F</td>
</tr>
<tr>
<td>fixed-length 64-bit float</td>
<td>0x31, F</td>
</tr>
<tr>
<td>TEXT</td>
<td>0x33, T</td>
</tr>
<tr>
<td>variable length BLOB</td>
<td>0x35, B</td>
</tr>
<tr>
<td>byte-for-byte BLOB</td>
<td>0x36, X</td>
</tr>
</table>
<h3>Null Encoding</h3>
<p>
Each value that is a NULL encodes as a single byte of 0x05. Since every other value encoding
begins with a byte greater than 0x05, this forces NULL values to sort first.
</p>
<h3>Text Encoding</h3>
<p>
Each text value begins with a single byte of 0x33 and ends with a single byte of 0x00. There are
zero or more intervening bytes that encode the text value. The intervening bytes are chosen so
that the encoding will sort in the desired collating order. The intervening bytes may not contain
a 0x00 character; the only 0x00 byte allowed in a text encoding is the final byte.
</p>
<p>
The text encoding ends in 0x00 in order to ensure that when there are two strings where one is a
prefix of the other that the shorter string will sort first.
</p>
<h3>Binary Encoding</h3>
<p>
There are two encoding strategies for binary fields, referred to as "BlobVar" and "BlobCopy".
BlobVar is less efficient in both space and encoding time. It has no limitations on the range of
encoded values. BlobCopy is a byte-for-byte copy of the input data followed by a termination
byte. It is extremely fast to encode and decode. It carries the restriction of not allowing a
0x00 value in the input byte[] as this value is used as the termination byte.
</p>
<h4>BlobVar</h4>
<p>
"BlobVar" encodes the input byte[] in a manner similar to a variable length integer encoding. As
with the other <code>OrderedBytes</code> encodings, the first encoded byte is used to indicate what
kind of value follows. This header byte is 0x37 for BlobVar encoded values. As with the
traditional varint encoding, the most significant bit of each subsequent encoded <code>byte</code> is
used as a continuation marker. The 7 remaining bits contain the 7 most significant bits of the
first unencoded byte. The next encoded byte starts with a continuation marker in the MSB. The
least significant bit from the first unencoded byte follows, and the remaining 6 bits contain the
6 MSBs of the second unencoded byte. The encoding continues, encoding 7 bytes on to 8 encoded
bytes. The MSB of the final encoded byte contains a termination marker rather than a continuation
marker, and any remaining bits from the final input byte. Any trailing bits in the final encoded
byte are zeros.
</p>
<h4>BlobCopy</h4>
<p>
"BlobCopy" is a simple byte-for-byte copy of the input data. It uses 0x38 as the header byte, and
is terminated by 0x00 in the DESCENDING case. This alternative encoding is faster and more
space-efficient, but it cannot accept values containing a 0x00 byte in DESCENDING order.
</p>
<h3>Variable-length Numeric Encoding</h3>
<p>
Numeric values must be coded so as to sort in numeric order. We assume that numeric values can be
both integer and floating point values. Clients must be careful to use inspection methods for
encoded values (such as <a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isNumericInfinite-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>isNumericInfinite(PositionedByteRange)</code></a> and
<a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isNumericNaN-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>isNumericNaN(PositionedByteRange)</code></a> to protect against decoding values into object which
do not support these numeric concepts (such as <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang"><code>Long</code></a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a>).
</p>
<p>
Simplest cases first: If the numeric value is a NaN, then the encoding is a single byte of 0x25.
This causes NaN values to sort after every other numeric value.
</p>
<p>
If the numeric value is a negative infinity then the encoding is a single byte of 0x07. Since
every other numeric value except NaN has a larger initial byte, this encoding ensures that
negative infinity will sort prior to every other numeric value other than NaN.
</p>
<p>
If the numeric value is a positive infinity then the encoding is a single byte of 0x23. Every
other numeric value encoding begins with a smaller byte, ensuring that positive infinity always
sorts last among numeric values. 0x23 is also smaller than 0x33, the initial byte of a text
value, ensuring that every numeric value sorts before every text value.
</p>
<p>
If the numeric value is exactly zero then it is encoded as a single byte of 0x15. Finite negative
values will have initial bytes of 0x08 through 0x14 and finite positive values will have initial
bytes of 0x16 through 0x22.
</p>
<p>
For all numeric values, we compute a mantissa M and an exponent E. The mantissa is a base-100
representation of the value. The exponent E determines where to put the decimal point.
</p>
<p>
Each centimal digit of the mantissa is stored in a byte. If the value of the centimal digit is X
(hence X&ge;0 and X&le;99) then the byte value will be 2*X+1 for every byte of the mantissa,
except for the last byte which will be 2*X+0. The mantissa must be the minimum number of bytes
necessary to represent the value; trailing X==0 digits are omitted. This means that the mantissa
will never contain a byte with the value 0x00.
</p>
<p>
If we assume all digits of the mantissa occur to the right of the decimal point, then the
exponent E is the power of one hundred by which one must multiply the mantissa to recover the
original value.
</p>
<p>
Values are classified as large, medium, or small according to the value of E. If E is 11 or more,
the value is large. For E between 0 and 10, the value is medium. For E less than zero, the value
is small.
</p>
<p>
Large positive values are encoded as a single byte 0x22 followed by E as a varint and then M.
Medium positive values are a single byte of 0x17+E followed by M. Small positive values are
encoded as a single byte 0x16 followed by the ones-complement of the varint for -E followed by M.
</p>
<p>
Small negative values are encoded as a single byte 0x14 followed by -E as a varint and then the
ones-complement of M. Medium negative values are encoded as a byte 0x13-E followed by the
ones-complement of M. Large negative values consist of the single byte 0x08 followed by the
ones-complement of the varint encoding of E followed by the ones-complement of M.
</p>
<h3>Fixed-length Integer Encoding</h3>
<p>
All 4-byte integers are serialized to a 5-byte, fixed-width, sortable byte format. All 8-byte
integers are serialized to the equivelant 9-byte format. Serialization is performed by writing a
header byte, inverting the integer sign bit and writing the resulting bytes to the byte array in
big endian order.
</p>
<h3>Fixed-length Floating Point Encoding</h3>
<p>
32-bit and 64-bit floating point numbers are encoded to a 5-byte and 9-byte encoding format,
respectively. The format is identical, save for the precision respected in each step of the
operation.
<p>
This format ensures the following total ordering of floating point values:
Float.NEGATIVE_INFINITY &lt; -Float.MAX_VALUE &lt; ... &lt; -Float.MIN_VALUE &lt; -0.0 &lt; +0.0;
&lt; Float.MIN_VALUE &lt; ... &lt; Float.MAX_VALUE &lt; Float.POSITIVE_INFINITY &lt; Float.NaN
</p>
<p>
Floating point numbers are encoded as specified in IEEE 754. A 32-bit single precision float
consists of a sign bit, 8-bit unsigned exponent encoded in offset-127 notation, and a 23-bit
significand. The format is described further in the
<a href="http://en.wikipedia.org/wiki/Single_precision"> Single Precision Floating Point
Wikipedia page</a>
</p>
<p>
The value of a normal float is -1 <sup>sign bit</sup> &times; 2<sup>exponent - 127</sup> &times;
1.significand
</p>
<p>
The IEE754 floating point format already preserves sort ordering for positive floating point
numbers when the raw bytes are compared in most significant byte order. This is discussed further
at <a href= "http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm">
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm</a>
</p>
<p>
Thus, we need only ensure that negative numbers sort in the the exact opposite order as positive
numbers (so that say, negative infinity is less than negative 1), and that all negative numbers
compare less than any positive number. To accomplish this, we invert the sign bit of all floating
point numbers, and we also invert the exponent and significand bits if the floating point number
was negative.
</p>
<p>
More specifically, we first store the floating point bits into a 32-bit int <code>j</code> using
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#floatToIntBits-float-" title="class or interface in java.lang"><code>Float.floatToIntBits(float)</code></a>. This method collapses all NaNs into a single, canonical NaN value
but otherwise leaves the bits unchanged. We then compute
</p>
<pre>
j &circ;= (j &gt;&gt; (Integer.SIZE - 1)) | Integer.MIN_SIZE
</pre>
<p>
which inverts the sign bit and XOR's all other bits with the sign bit itself. Comparing the raw
bytes of <code>j</code> in most significant byte order is equivalent to performing a single precision
floating point comparison on the underlying bits (ignoring NaN comparisons, as NaNs don't compare
equal to anything when performing floating point comparisons).
</p>
<p>
The resulting integer is then converted into a byte array by serializing the integer one byte at
a time in most significant byte order. The serialized integer is prefixed by a single header
byte. All serialized values are 5 bytes in length.
</p>
<p>
<code>OrderedBytes</code> encodings are heavily influenced by the
<a href="http://sqlite.org/src4/doc/trunk/www/key_encoding.wiki">SQLite4 Key Encoding</a>. Slight
deviations are make in the interest of order correctness and user extensibility. Fixed-width
<code>Long</code> and <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang"><code>Double</code></a> encodings are based on implementations from the now defunct
Orderly library.
</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== 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 static byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#BLOB_COPY">BLOB_COPY</a></span></code>&nbsp;</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/OrderedBytes.html#BLOB_VAR">BLOB_VAR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/MathContext.html?is-external=true" title="class or interface in java.math">MathContext</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#DEFAULT_MATH_CONTEXT">DEFAULT_MATH_CONTEXT</a></span></code>
<div class="block">The context used to normalize <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> values.</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/OrderedBytes.html#FIXED_FLOAT32">FIXED_FLOAT32</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#FIXED_FLOAT64">FIXED_FLOAT64</a></span></code>&nbsp;</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/OrderedBytes.html#FIXED_INT16">FIXED_INT16</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#FIXED_INT32">FIXED_INT32</a></span></code>&nbsp;</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/OrderedBytes.html#FIXED_INT64">FIXED_INT64</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#FIXED_INT8">FIXED_INT8</a></span></code>&nbsp;</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/OrderedBytes.html#MAX_PRECISION">MAX_PRECISION</a></span></code>
<div class="block">Max precision guaranteed to fit into a <code>long</code>.</div>
</td>
</tr>
<tr 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/OrderedBytes.html#NAN">NAN</a></span></code>&nbsp;</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/OrderedBytes.html#NEG_INF">NEG_INF</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#NEG_LARGE">NEG_LARGE</a></span></code>&nbsp;</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/OrderedBytes.html#NEG_MED_MAX">NEG_MED_MAX</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#NEG_MED_MIN">NEG_MED_MIN</a></span></code>&nbsp;</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/OrderedBytes.html#NEG_SMALL">NEG_SMALL</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#NULL">NULL</a></span></code>&nbsp;</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/OrderedBytes.html#POS_INF">POS_INF</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#POS_LARGE">POS_LARGE</a></span></code>&nbsp;</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/OrderedBytes.html#POS_MED_MAX">POS_MED_MAX</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#POS_MED_MIN">POS_MED_MIN</a></span></code>&nbsp;</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/OrderedBytes.html#POS_SMALL">POS_SMALL</a></span></code>&nbsp;</td>
</tr>
<tr 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/OrderedBytes.html#TERM">TERM</a></span></code>&nbsp;</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/OrderedBytes.html#TEXT">TEXT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#UTF8">UTF8</a></span></code>&nbsp;</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/OrderedBytes.html#ZERO">ZERO</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/OrderedBytes.html#OrderedBytes--">OrderedBytes</a></span>()</code>&nbsp;</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="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>(package private) static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#blobVarDecodedLength-int-">blobVarDecodedLength</a></span>(int&nbsp;len)</code>
<div class="block">Calculate the expected BlobVar decoded length based on encoded length.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#blobVarEncodedLength-int-">blobVarEncodedLength</a></span>(int&nbsp;len)</code>
<div class="block">Calculate the expected BlobVar encoded length based on unencoded length.</div>
</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/OrderedBytes.html#decodeBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeBlobCopy</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode a Blob value, byte-for-byte copy.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static byte[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeBlobVar</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode a blob value that was encoded using BlobVar encoding.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeFloat32-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeFloat32</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode a 32-bit floating point value using the fixed-length encoding.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeFloat64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode a 64-bit floating point value using the fixed-length encoding.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static short</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeInt16-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeInt16</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode an <code>int16</code> value.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeInt32-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeInt32</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode an <code>int32</code> value.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeInt64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode an <code>int64</code> value.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeInt8-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeInt8</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode an <code>int8</code> value.</div>
</td>
</tr>
<tr id="i10" 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/OrderedBytes.html#decodeNumericAsBigDecimal-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeNumericAsBigDecimal</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode 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"><code>BigDecimal</code></a> value from the variable-length encoding.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeNumericAsDouble-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeNumericAsDouble</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode a primitive <code>double</code> value from the Numeric encoding.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeNumericAsLong-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeNumericAsLong</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode a primitive <code>long</code> value from the Numeric encoding.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>private 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/OrderedBytes.html#decodeNumericValue-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeNumericValue</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode 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"><code>BigDecimal</code></a> from <code>src</code>.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>private 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/OrderedBytes.html#decodeSignificand-org.apache.hadoop.hbase.util.PositionedByteRange-int-boolean-">decodeSignificand</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
int&nbsp;e,
boolean&nbsp;comp)</code>
<div class="block">Read significand digits from <code>src</code> according to the magnitude of <code>e</code>.</div>
</td>
</tr>
<tr id="i15" 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/OrderedBytes.html#decodeString-org.apache.hadoop.hbase.util.PositionedByteRange-">decodeString</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Decode a String value.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-int-int-org.apache.hadoop.hbase.util.Order-">encodeBlobCopy</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte[]&nbsp;val,
int&nbsp;voff,
int&nbsp;vlen,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a Blob value as a byte-for-byte copy.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-org.apache.hadoop.hbase.util.Order-">encodeBlobCopy</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte[]&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a Blob value as a byte-for-byte copy.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-int-int-org.apache.hadoop.hbase.util.Order-">encodeBlobVar</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte[]&nbsp;val,
int&nbsp;voff,
int&nbsp;vlen,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a Blob value using a modified varint encoding scheme.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-org.apache.hadoop.hbase.util.Order-">encodeBlobVar</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte[]&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a blob value using a modified varint encoding scheme.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeFloat32-org.apache.hadoop.hbase.util.PositionedByteRange-float-org.apache.hadoop.hbase.util.Order-">encodeFloat32</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
float&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a 32-bit floating point value using the fixed-length encoding.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-double-org.apache.hadoop.hbase.util.Order-">encodeFloat64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
double&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a 64-bit floating point value using the fixed-length encoding.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt16-org.apache.hadoop.hbase.util.PositionedByteRange-short-org.apache.hadoop.hbase.util.Order-">encodeInt16</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
short&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode an <code>int16</code> value using the fixed-length encoding.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt32-org.apache.hadoop.hbase.util.PositionedByteRange-int-org.apache.hadoop.hbase.util.Order-">encodeInt32</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
int&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode an <code>int32</code> value using the fixed-length encoding.</div>
</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/OrderedBytes.html#encodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-">encodeInt64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
long&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode an <code>int64</code> value using the fixed-length encoding.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt8-org.apache.hadoop.hbase.util.PositionedByteRange-byte-org.apache.hadoop.hbase.util.Order-">encodeInt8</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode an <code>int8</code> value using the fixed-length encoding.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNull-org.apache.hadoop.hbase.util.PositionedByteRange-org.apache.hadoop.hbase.util.Order-">encodeNull</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a null value.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-org.apache.hadoop.hbase.util.Order-">encodeNumeric</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a numerical value using the variable-length encoding.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-double-org.apache.hadoop.hbase.util.Order-">encodeNumeric</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
double&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a numerical value using the variable-length encoding.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-">encodeNumeric</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
long&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a numerical value using the variable-length encoding.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>private static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumericLarge-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-">encodeNumericLarge</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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">Encode the large magnitude floating point number <code>val</code> using the key encoding.</div>
</td>
</tr>
<tr id="i31" 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/OrderedBytes.html#encodeNumericSmall-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-">encodeNumericSmall</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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">
Encode the small magnitude floating point number <code>val</code> using the key encoding.</div>
</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/OrderedBytes.html#encodeString-org.apache.hadoop.hbase.util.PositionedByteRange-java.lang.String-org.apache.hadoop.hbase.util.Order-">encodeString</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</code>
<div class="block">Encode a String value.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>private static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeToCentimal-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-">encodeToCentimal</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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">Encode a value val in [0.01, 1.0) into Centimals.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>(package private) static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#getVaruint64-org.apache.hadoop.hbase.util.PositionedByteRange-boolean-">getVaruint64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
boolean&nbsp;comp)</code>
<div class="block">Decode a sequence of bytes in <code>src</code> as a varuint64.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-">isBlobCopy</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses BlobCopy encoding, false otherwise.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-">isBlobVar</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses BlobVar encoding, false otherwise.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isEncodedValue-org.apache.hadoop.hbase.util.PositionedByteRange-">isEncodedValue</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Returns true when <code>src</code> appears to be positioned an encoded value, false otherwise.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isFixedFloat32-org.apache.hadoop.hbase.util.PositionedByteRange-">isFixedFloat32</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Float32 encoding, false
otherwise.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isFixedFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-">isFixedFloat64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Float64 encoding, false
otherwise.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isFixedInt16-org.apache.hadoop.hbase.util.PositionedByteRange-">isFixedInt16</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Int16 encoding, false
otherwise.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isFixedInt32-org.apache.hadoop.hbase.util.PositionedByteRange-">isFixedInt32</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Int32 encoding, false
otherwise.</div>
</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/OrderedBytes.html#isFixedInt64-org.apache.hadoop.hbase.util.PositionedByteRange-">isFixedInt64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Int64 encoding, false
otherwise.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isFixedInt8-org.apache.hadoop.hbase.util.PositionedByteRange-">isFixedInt8</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Int8 encoding, false
otherwise.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isNull-org.apache.hadoop.hbase.util.PositionedByteRange-">isNull</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> is null, false otherwise.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-">isNumeric</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses Numeric encoding, false otherwise.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isNumericInfinite-org.apache.hadoop.hbase.util.PositionedByteRange-">isNumericInfinite</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses Numeric encoding and is
<code>Infinite</code>, false otherwise.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isNumericNaN-org.apache.hadoop.hbase.util.PositionedByteRange-">isNumericNaN</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses Numeric encoding and is
<code>NaN</code>, false otherwise.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isNumericZero-org.apache.hadoop.hbase.util.PositionedByteRange-">isNumericZero</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses Numeric encoding and is <code>0</code>,
false otherwise.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#isText-org.apache.hadoop.hbase.util.PositionedByteRange-">isText</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Return true when the next encoded value in <code>src</code> uses Text encoding, false otherwise.</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#length-org.apache.hadoop.hbase.util.PositionedByteRange-">length</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;buff)</code>
<div class="block">Return the number of encoded entries remaining in <code>buff</code>.</div>
</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#lengthVaruint64-org.apache.hadoop.hbase.util.PositionedByteRange-boolean-">lengthVaruint64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
boolean&nbsp;comp)</code>
<div class="block">Inspect <code>src</code> for an encoded varuint64 for its length in bytes.</div>
</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code>(package private) 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/OrderedBytes.html#normalize-java.math.BigDecimal-">normalize</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">Strip all trailing zeros to ensure that no digit will be zero and round using our default
context to ensure precision doesn't exceed max allowed.</div>
</td>
</tr>
<tr id="i53" 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/OrderedBytes.html#putUint32-org.apache.hadoop.hbase.util.PositionedByteRange-int-">putUint32</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
int&nbsp;val)</code>
<div class="block">Write a 32-bit unsigned integer to <code>dst</code> as 4 big-endian bytes.</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#putVaruint64-org.apache.hadoop.hbase.util.PositionedByteRange-long-boolean-">putVaruint64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
long&nbsp;val,
boolean&nbsp;comp)</code>
<div class="block">Encode an unsigned 64-bit unsigned integer <code>val</code> into <code>dst</code>.</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/OrderedBytes.html#skip-org.apache.hadoop.hbase.util.PositionedByteRange-">skip</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</code>
<div class="block">Skip <code>buff</code>'s position forward over one encoded value.</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code>private static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#skipSignificand-org.apache.hadoop.hbase.util.PositionedByteRange-boolean-">skipSignificand</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
boolean&nbsp;comp)</code>
<div class="block">Skip <code>src</code> over the significand bytes.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#skipVaruint64-org.apache.hadoop.hbase.util.PositionedByteRange-boolean-">skipVaruint64</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
boolean&nbsp;cmp)</code>
<div class="block">Skip <code>src</code> over the encoded varuint64.</div>
</td>
</tr>
<tr id="i58" class="altColor">
<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/OrderedBytes.html#unexpectedHeader-byte-">unexpectedHeader</a></span>(byte&nbsp;header)</code>
<div class="block">Creates the standard exception when the encoded header byte is unexpected for the decoding
context.</div>
</td>
</tr>
<tr id="i59" 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/OrderedBytes.html#unsignedCmp-long-long-">unsignedCmp</a></span>(long&nbsp;x1,
long&nbsp;x2)</code>
<div class="block">Perform unsigned comparison between two long values.</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#equals-java.lang.Object-" title="class or interface in java.lang">equals</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#hashCode--" title="class or interface in java.lang">hashCode</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#toString--" title="class or interface in java.lang">toString</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="NULL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NULL</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.306">NULL</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.NULL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NEG_INF">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NEG_INF</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.308">NEG_INF</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.NEG_INF">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NEG_LARGE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NEG_LARGE</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.309">NEG_LARGE</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.NEG_LARGE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NEG_MED_MIN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NEG_MED_MIN</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.310">NEG_MED_MIN</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.NEG_MED_MIN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NEG_MED_MAX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NEG_MED_MAX</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.311">NEG_MED_MAX</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.NEG_MED_MAX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NEG_SMALL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NEG_SMALL</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.312">NEG_SMALL</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.NEG_SMALL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ZERO">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ZERO</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.313">ZERO</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.ZERO">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="POS_SMALL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>POS_SMALL</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.314">POS_SMALL</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.POS_SMALL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="POS_MED_MIN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>POS_MED_MIN</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.315">POS_MED_MIN</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.POS_MED_MIN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="POS_MED_MAX">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>POS_MED_MAX</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.316">POS_MED_MAX</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.POS_MED_MAX">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="POS_LARGE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>POS_LARGE</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.317">POS_LARGE</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.POS_LARGE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="POS_INF">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>POS_INF</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.318">POS_INF</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.POS_INF">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NAN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NAN</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.320">NAN</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.NAN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FIXED_INT8">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FIXED_INT8</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.322">FIXED_INT8</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.FIXED_INT8">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FIXED_INT16">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FIXED_INT16</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.323">FIXED_INT16</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.FIXED_INT16">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FIXED_INT32">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FIXED_INT32</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.324">FIXED_INT32</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.FIXED_INT32">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FIXED_INT64">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FIXED_INT64</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.325">FIXED_INT64</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.FIXED_INT64">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FIXED_FLOAT32">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FIXED_FLOAT32</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.327">FIXED_FLOAT32</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.FIXED_FLOAT32">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="FIXED_FLOAT64">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FIXED_FLOAT64</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.328">FIXED_FLOAT64</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.FIXED_FLOAT64">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="TEXT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TEXT</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.330">TEXT</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.TEXT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="BLOB_VAR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BLOB_VAR</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.332">BLOB_VAR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.BLOB_VAR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="BLOB_COPY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BLOB_COPY</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.333">BLOB_COPY</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.BLOB_COPY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="UTF8">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UTF8</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.339">UTF8</a></pre>
</li>
</ul>
<a name="TERM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TERM</h4>
<pre>private static final&nbsp;byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.340">TERM</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.TERM">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MAX_PRECISION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_PRECISION</h4>
<pre>public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.345">MAX_PRECISION</a></pre>
<div class="block">Max precision guaranteed to fit into a <code>long</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.OrderedBytes.MAX_PRECISION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MATH_CONTEXT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_MATH_CONTEXT</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/math/MathContext.html?is-external=true" title="class or interface in java.math">MathContext</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.350">DEFAULT_MATH_CONTEXT</a></pre>
<div class="block">The context used to normalize <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> values.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="OrderedBytes--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>OrderedBytes</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.297">OrderedBytes</a>()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="unexpectedHeader-byte-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unexpectedHeader</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/OrderedBytes.html#line.358">unexpectedHeader</a>(byte&nbsp;header)</pre>
<div class="block">Creates the standard exception when the encoded header byte is unexpected for the decoding
context.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>header</code> - value used in error message.</dd>
</dl>
</li>
</ul>
<a name="unsignedCmp-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unsignedCmp</h4>
<pre>private static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.367">unsignedCmp</a>(long&nbsp;x1,
long&nbsp;x2)</pre>
<div class="block">Perform unsigned comparison between two long values. Conforms to the same interface as
<a href="../../../../../org/apache/hadoop/hbase/CellComparator.html" title="interface in org.apache.hadoop.hbase"><code>CellComparator</code></a>.</div>
</li>
</ul>
<a name="putUint32-org.apache.hadoop.hbase.util.PositionedByteRange-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putUint32</h4>
<pre>private static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.379">putUint32</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
int&nbsp;val)</pre>
<div class="block">Write a 32-bit unsigned integer to <code>dst</code> as 4 big-endian bytes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="putVaruint64-org.apache.hadoop.hbase.util.PositionedByteRange-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putVaruint64</h4>
<pre>static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.391">putVaruint64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
long&nbsp;val,
boolean&nbsp;comp)</pre>
<div class="block">Encode an unsigned 64-bit unsigned integer <code>val</code> into <code>dst</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which encoded bytes are written.</dd>
<dd><code>val</code> - The value to write.</dd>
<dd><code>comp</code> - Compliment the encoded value when <code>comp</code> is true.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="lengthVaruint64-org.apache.hadoop.hbase.util.PositionedByteRange-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lengthVaruint64</h4>
<pre>static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.467">lengthVaruint64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
boolean&nbsp;comp)</pre>
<div class="block">Inspect <code>src</code> for an encoded varuint64 for its length in bytes. Preserves the state of
<code>src</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>src</code> - source buffer</dd>
<dd><code>comp</code> - if true, parse the compliment of the value.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes consumed by this value.</dd>
</dl>
</li>
</ul>
<a name="skipVaruint64-org.apache.hadoop.hbase.util.PositionedByteRange-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipVaruint64</h4>
<pre>static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.487">skipVaruint64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
boolean&nbsp;cmp)</pre>
<div class="block">Skip <code>src</code> over the encoded varuint64.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>src</code> - source buffer</dd>
<dd><code>cmp</code> - if true, parse the compliment of the value.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes skipped.</dd>
</dl>
</li>
</ul>
<a name="getVaruint64-org.apache.hadoop.hbase.util.PositionedByteRange-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getVaruint64</h4>
<pre>static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.498">getVaruint64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
boolean&nbsp;comp)</pre>
<div class="block">Decode a sequence of bytes in <code>src</code> as a varuint64. Compliment the encoded value when
<code>comp</code> is true.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the decoded value.</dd>
</dl>
</li>
</ul>
<a name="normalize-java.math.BigDecimal-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>normalize</h4>
<pre>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/OrderedBytes.html#line.553">normalize</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">Strip all trailing zeros to ensure that no digit will be zero and round using our default
context to ensure precision doesn't exceed max allowed. From Phoenix's <code>NumberUtil</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>new <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> instance</dd>
</dl>
</li>
</ul>
<a name="decodeSignificand-org.apache.hadoop.hbase.util.PositionedByteRange-int-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeSignificand</h4>
<pre>private 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/OrderedBytes.html#line.565">decodeSignificand</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
int&nbsp;e,
boolean&nbsp;comp)</pre>
<div class="block">Read significand digits from <code>src</code> according to the magnitude of <code>e</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>src</code> - The source from which to read encoded digits.</dd>
<dd><code>e</code> - The magnitude of the first digit read.</dd>
<dd><code>comp</code> - Treat encoded bytes as compliments when <code>comp</code> is true.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The decoded 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> - when read exceeds the remaining length of <code>src</code>.</dd>
</dl>
</li>
</ul>
<a name="skipSignificand-org.apache.hadoop.hbase.util.PositionedByteRange-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipSignificand</h4>
<pre>private static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.605">skipSignificand</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src,
boolean&nbsp;comp)</pre>
<div class="block">Skip <code>src</code> over the significand bytes.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>src</code> - The source from which to read encoded digits.</dd>
<dd><code>comp</code> - Treat encoded bytes as compliments when <code>comp</code> is true.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes skipped.</dd>
</dl>
</li>
</ul>
<a name="encodeNumericSmall-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeNumericSmall</h4>
<pre>private static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.638">encodeNumericSmall</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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"><p>
Encode the small magnitude floating point number <code>val</code> using the key encoding. The caller
guarantees that 1.0 > abs(val) > 0.0.
</p>
<p>
A floating point value is encoded as an integer exponent <code>E</code> and a mantissa <code>M</code>.
The original value is equal to <code>(M * 100^E)</code>. <code>E</code> is set to the smallest value
possible without making <code>M</code> greater than or equal to 1.0.
</p>
<p>
For this routine, <code>E</code> will always be zero or negative, since the original value is less
than one. The encoding written by this routine is the ones-complement of the varint of the
negative of <code>E</code> followed by the mantissa:
<pre>
Encoding: ~-E M
</pre>
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which encoded digits are written.</dd>
<dd><code>val</code> - The value to encode.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="encodeNumericLarge-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeNumericLarge</h4>
<pre>private static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.705">encodeNumericLarge</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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">Encode the large magnitude floating point number <code>val</code> using the key encoding. The caller
guarantees that <code>val</code> will be finite and abs(val) >= 1.0.
<p>
A floating point value is encoded as an integer exponent <code>E</code> and a mantissa <code>M</code>.
The original value is equal to <code>(M * 100^E)</code>. <code>E</code> is set to the smallest value
possible without making <code>M</code> greater than or equal to 1.0.
</p>
<p>
Each centimal digit of the mantissa is stored in a byte. If the value of the centimal digit is
<code>X</code> (hence <code>X&gt;=0</code> and <code>X&lt;=99</code>) then the byte value will be <code>2*X+1</code> for
every byte of the mantissa, except for the last byte which will be <code>2*X+0</code>. The mantissa
must be the minimum number of bytes necessary to represent the value; trailing <code>X==0</code>
digits are omitted. This means that the mantissa will never contain a byte with the value
<code>0x00</code>.
</p>
<p>
If <code>E &gt; 10</code>, then this routine writes of <code>E</code> as a varint followed by the mantissa
as described above. Otherwise, if <code>E &lt;= 10</code>, this routine only writes the mantissa and
leaves the <code>E</code> value to be encoded as part of the opening byte of the field by the
calling function.
<pre>
Encoding: M (if E&lt;=10)
E M (if E&gt;10)
</pre>
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which encoded digits are written.</dd>
<dd><code>val</code> - The value to encode.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="encodeToCentimal-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeToCentimal</h4>
<pre>private static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.754">encodeToCentimal</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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">Encode a value val in [0.01, 1.0) into Centimals. Util function for
<a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumericLarge-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-"><code>encodeNumericLarge(PositionedByteRange, BigDecimal)</code></a> and
<a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumericSmall-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-"><code>encodeNumericSmall(PositionedByteRange, BigDecimal)</code></a></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which encoded digits are written.</dd>
<dd><code>val</code> - A BigDecimal after the normalization. The value must be in [0.01, 1.0).</dd>
</dl>
</li>
</ul>
<a name="encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeNumeric</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.781">encodeNumeric</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
long&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a numerical value using the variable-length encoding.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which encoded digits are written.</dd>
<dd><code>val</code> - The value to encode.</dd>
<dd><code>ord</code> - The <a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util"><code>Order</code></a> to respect while encoding <code>val</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-double-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeNumeric</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.792">encodeNumeric</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
double&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a numerical value using the variable-length encoding.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which encoded digits are written.</dd>
<dd><code>val</code> - The value to encode.</dd>
<dd><code>ord</code> - The <a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util"><code>Order</code></a> to respect while encoding <code>val</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeNumeric</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.821">encodeNumeric</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a numerical value using the variable-length encoding. If the number of significant
digits of the value exceeds the <a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#MAX_PRECISION"><code>MAX_PRECISION</code></a>, the exceeding part will be
lost.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which encoded digits are written.</dd>
<dd><code>val</code> - The value to encode.</dd>
<dd><code>ord</code> - The <a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util"><code>Order</code></a> to respect while encoding <code>val</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="decodeNumericValue-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeNumericValue</h4>
<pre>private 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/OrderedBytes.html#line.845">decodeNumericValue</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode 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"><code>BigDecimal</code></a> from <code>src</code>. Assumes <code>src</code> encodes a value in Numeric
encoding and is within the valid range of <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> values. <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> does
not support <code>NaN</code> or <code>Infinte</code> values.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeNumericAsDouble-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>decodeNumericAsDouble(PositionedByteRange)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeNumericAsDouble-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeNumericAsDouble</h4>
<pre>public static&nbsp;double&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.894">decodeNumericAsDouble</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode a primitive <code>double</code> value from the Numeric encoding. Numeric encoding is based on
<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a>; in the event the encoded value is larger than can be represented in a
<code>double</code>, this method performs an implicit narrowing conversion as described in
<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#doubleValue--" title="class or interface in java.math"><code>BigDecimal.doubleValue()</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - when the encoded value is <code>NULL</code>.</dd>
<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> - when the encoded value is not a Numeric.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-double-org.apache.hadoop.hbase.util.Order-"><code>encodeNumeric(PositionedByteRange, double, Order)</code></a>,
<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#doubleValue--" title="class or interface in java.math"><code>BigDecimal.doubleValue()</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeNumericAsLong-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeNumericAsLong</h4>
<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.931">decodeNumericAsLong</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode a primitive <code>long</code> value from the Numeric encoding. Numeric encoding is based on
<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a>; in the event the encoded value is larger than can be represented in a
<code>long</code>, this method performs an implicit narrowing conversion as described in
<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#doubleValue--" title="class or interface in java.math"><code>BigDecimal.doubleValue()</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - when the encoded value is <code>NULL</code>.</dd>
<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> - when the encoded value is not a Numeric.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-"><code>encodeNumeric(PositionedByteRange, long, Order)</code></a>,
<a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#longValue--" title="class or interface in java.math"><code>BigDecimal.longValue()</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeNumericAsBigDecimal-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeNumericAsBigDecimal</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/OrderedBytes.html#line.950">decodeNumericAsBigDecimal</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode 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"><code>BigDecimal</code></a> value from the variable-length encoding.</div>
<dl>
<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> - when the encoded value is not a Numeric.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-java.math.BigDecimal-org.apache.hadoop.hbase.util.Order-"><code>encodeNumeric(PositionedByteRange, BigDecimal, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="encodeString-org.apache.hadoop.hbase.util.PositionedByteRange-java.lang.String-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeString</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.970">encodeString</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<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;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a String value. String encoding is 0x00-terminated and so it does not support
<code></code> codepoints in the value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which the encoded value is written.</dd>
<dd><code>val</code> - The value to encode.</dd>
<dd><code>ord</code> - The <a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util"><code>Order</code></a> to respect while encoding <code>val</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</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> - when <code>val</code> contains a <code></code>.</dd>
</dl>
</li>
</ul>
<a name="decodeString-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeString</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/OrderedBytes.html#line.988">decodeString</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode a String value.</div>
</li>
</ul>
<a name="blobVarEncodedLength-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blobVarEncodedLength</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1014">blobVarEncodedLength</a>(int&nbsp;len)</pre>
<div class="block">Calculate the expected BlobVar encoded length based on unencoded length.</div>
</li>
</ul>
<a name="blobVarDecodedLength-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blobVarDecodedLength</h4>
<pre>static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1024">blobVarDecodedLength</a>(int&nbsp;len)</pre>
<div class="block">Calculate the expected BlobVar decoded length based on encoded length.</div>
</li>
</ul>
<a name="encodeBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-int-int-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeBlobVar</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1043">encodeBlobVar</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte[]&nbsp;val,
int&nbsp;voff,
int&nbsp;vlen,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a Blob value using a modified varint encoding scheme.
<p>
This format encodes a byte[] value such that no limitations on the input value are imposed. The
first byte encodes the encoding scheme that follows, <a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#BLOB_VAR"><code>BLOB_VAR</code></a>. Each encoded byte
thereafter consists of a header bit followed by 7 bits of payload. A header bit of '1'
indicates continuation of the encoding. A header bit of '0' indicates this byte contains the
last of the payload. An empty input value is encoded as the header byte immediately followed by
a termination byte <code>0x00</code>. This is not ambiguous with the encoded value of <code>[]</code>,
which results in <code>[0x80, 0x00]</code>.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="encodeBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeBlobVar</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1083">encodeBlobVar</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte[]&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a blob value using a modified varint encoding scheme.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-int-int-org.apache.hadoop.hbase.util.Order-"><code>encodeBlobVar(PositionedByteRange, byte[], int, int, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeBlobVar</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1090">decodeBlobVar</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode a blob value that was encoded using BlobVar encoding.</div>
</li>
</ul>
<a name="encodeBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-int-int-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeBlobCopy</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1141">encodeBlobCopy</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte[]&nbsp;val,
int&nbsp;voff,
int&nbsp;vlen,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a Blob value as a byte-for-byte copy. BlobCopy encoding in DESCENDING order is NULL
terminated so as to preserve proper sorting of <code>[]</code> and so it does not support
<code>0x00</code> in the value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</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> - when <code>ord</code> is DESCENDING and <code>val</code> contains a
<code>0x00</code> byte.</dd>
</dl>
</li>
</ul>
<a name="encodeBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeBlobCopy</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1181">encodeBlobCopy</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte[]&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a Blob value as a byte-for-byte copy. BlobCopy encoding in DESCENDING order is NULL
terminated so as to preserve proper sorting of <code>[]</code> and so it does not support
<code>0x00</code> in the value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</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> - when <code>ord</code> is DESCENDING and <code>val</code> contains a
<code>0x00</code> byte.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-int-int-org.apache.hadoop.hbase.util.Order-"><code>encodeBlobCopy(PositionedByteRange, byte[], int, int, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeBlobCopy</h4>
<pre>public static&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1189">decodeBlobCopy</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode a Blob value, byte-for-byte copy.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-byte:A-int-int-org.apache.hadoop.hbase.util.Order-"><code>encodeBlobCopy(PositionedByteRange, byte[], int, int, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="encodeNull-org.apache.hadoop.hbase.util.PositionedByteRange-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeNull</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1212">encodeNull</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a null value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dst</code> - The destination to which encoded digits are written.</dd>
<dd><code>ord</code> - The <a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util"><code>Order</code></a> to respect while encoding <code>val</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
</dl>
</li>
</ul>
<a name="encodeInt8-org.apache.hadoop.hbase.util.PositionedByteRange-byte-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeInt8</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1223">encodeInt8</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
byte&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode an <code>int8</code> value using the fixed-length encoding.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-"><code>encodeInt64(PositionedByteRange, long, Order)</code></a>,
<a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeInt8-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>decodeInt8(PositionedByteRange)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeInt8-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeInt8</h4>
<pre>public static&nbsp;byte&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1234">decodeInt8</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode an <code>int8</code> value.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt8-org.apache.hadoop.hbase.util.PositionedByteRange-byte-org.apache.hadoop.hbase.util.Order-"><code>encodeInt8(PositionedByteRange, byte, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="encodeInt16-org.apache.hadoop.hbase.util.PositionedByteRange-short-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeInt16</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1247">encodeInt16</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
short&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode an <code>int16</code> value using the fixed-length encoding.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-"><code>encodeInt64(PositionedByteRange, long, Order)</code></a>,
<a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeInt16-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>decodeInt16(PositionedByteRange)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeInt16-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeInt16</h4>
<pre>public static&nbsp;short&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1258">decodeInt16</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode an <code>int16</code> value.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt16-org.apache.hadoop.hbase.util.PositionedByteRange-short-org.apache.hadoop.hbase.util.Order-"><code>encodeInt16(PositionedByteRange, short, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="encodeInt32-org.apache.hadoop.hbase.util.PositionedByteRange-int-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeInt32</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1273">encodeInt32</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
int&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode an <code>int32</code> value using the fixed-length encoding.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-"><code>encodeInt64(PositionedByteRange, long, Order)</code></a>,
<a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeInt32-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>decodeInt32(PositionedByteRange)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeInt32-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeInt32</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1285">decodeInt32</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode an <code>int32</code> value.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt32-org.apache.hadoop.hbase.util.PositionedByteRange-int-org.apache.hadoop.hbase.util.Order-"><code>encodeInt32(PositionedByteRange, int, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="encodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeInt64</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1333">encodeInt64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
long&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode an <code>int64</code> value using the fixed-length encoding.
<p>
This format ensures that all longs sort in their natural order, as they would sort when using
signed long comparison.
</p>
<p>
All Longs are serialized to an 8-byte, fixed-width sortable byte format. Serialization is
performed by inverting the integer sign bit and writing the resulting bytes to the byte array
in big endian order. The encoded value is prefixed by the <a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#FIXED_INT64"><code>FIXED_INT64</code></a> header byte.
This encoding is designed to handle java language primitives and so Null values are NOT
supported by this implementation.
</p>
<p>
For example:
</p>
<pre>
Input: 0x0000000000000005 (5)
Result: 0x288000000000000005
Input: 0xfffffffffffffffb (-4)
Result: 0x280000000000000004
Input: 0x7fffffffffffffff (Long.MAX_VALUE)
Result: 0x28ffffffffffffffff
Input: 0x8000000000000000 (Long.MIN_VALUE)
Result: 0x287fffffffffffffff
</pre>
<p>
This encoding format, and much of this documentation string, is based on Orderly's
<code>FixedIntWritableRowKey</code>.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>decodeInt64(PositionedByteRange)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeInt64</h4>
<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1346">decodeInt64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode an <code>int64</code> value.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeInt64-org.apache.hadoop.hbase.util.PositionedByteRange-long-org.apache.hadoop.hbase.util.Order-"><code>encodeInt64(PositionedByteRange, long, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="encodeFloat32-org.apache.hadoop.hbase.util.PositionedByteRange-float-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeFloat32</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1364">encodeFloat32</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
float&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a 32-bit floating point value using the fixed-length encoding. Encoding format is
described at length in <a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-double-org.apache.hadoop.hbase.util.Order-"><code>encodeFloat64(PositionedByteRange, double, Order)</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeFloat32-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>decodeFloat32(PositionedByteRange)</code></a>,
<a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-double-org.apache.hadoop.hbase.util.Order-"><code>encodeFloat64(PositionedByteRange, double, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeFloat32-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeFloat32</h4>
<pre>public static&nbsp;float&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1378">decodeFloat32</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode a 32-bit floating point value using the fixed-length encoding.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeFloat32-org.apache.hadoop.hbase.util.PositionedByteRange-float-org.apache.hadoop.hbase.util.Order-"><code>encodeFloat32(PositionedByteRange, float, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="encodeFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-double-org.apache.hadoop.hbase.util.Order-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeFloat64</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1450">encodeFloat64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;dst,
double&nbsp;val,
<a href="../../../../../org/apache/hadoop/hbase/util/Order.html" title="enum in org.apache.hadoop.hbase.util">Order</a>&nbsp;ord)</pre>
<div class="block">Encode a 64-bit floating point value using the fixed-length encoding.
<p>
This format ensures the following total ordering of floating point values:
Double.NEGATIVE_INFINITY &lt; -Double.MAX_VALUE &lt; ... &lt; -Double.MIN_VALUE &lt; -0.0 &lt;
+0.0; &lt; Double.MIN_VALUE &lt; ... &lt; Double.MAX_VALUE &lt; Double.POSITIVE_INFINITY &lt;
Double.NaN
</p>
<p>
Floating point numbers are encoded as specified in IEEE 754. A 64-bit double precision float
consists of a sign bit, 11-bit unsigned exponent encoded in offset-1023 notation, and a 52-bit
significand. The format is described further in the
<a href="http://en.wikipedia.org/wiki/Double_precision"> Double Precision Floating Point
Wikipedia page</a>
</p>
<p>
The value of a normal float is -1 <sup>sign bit</sup> &times; 2<sup>exponent - 1023</sup>
&times; 1.significand
</p>
<p>
The IEE754 floating point format already preserves sort ordering for positive floating point
numbers when the raw bytes are compared in most significant byte order. This is discussed
further at
<a href= "http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm" >
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats. htm</a>
</p>
<p>
Thus, we need only ensure that negative numbers sort in the the exact opposite order as
positive numbers (so that say, negative infinity is less than negative 1), and that all
negative numbers compare less than any positive number. To accomplish this, we invert the sign
bit of all floating point numbers, and we also invert the exponent and significand bits if the
floating point number was negative.
</p>
<p>
More specifically, we first store the floating point bits into a 64-bit long <code>l</code> using
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#doubleToLongBits-double-" title="class or interface in java.lang"><code>Double.doubleToLongBits(double)</code></a>. This method collapses all NaNs into a single, canonical NaN
value but otherwise leaves the bits unchanged. We then compute
</p>
<pre>
l &circ;= (l &gt;&gt; (Long.SIZE - 1)) | Long.MIN_SIZE
</pre>
<p>
which inverts the sign bit and XOR's all other bits with the sign bit itself. Comparing the raw
bytes of <code>l</code> in most significant byte order is equivalent to performing a double
precision floating point comparison on the underlying bits (ignoring NaN comparisons, as NaNs
don't compare equal to anything when performing floating point comparisons).
</p>
<p>
The resulting long integer is then converted into a byte array by serializing the long one byte
at a time in most significant byte order. The serialized integer is prefixed by a single header
byte. All serialized values are 9 bytes in length.
</p>
<p>
This encoding format, and much of this highly detailed documentation string, is based on
Orderly's <code>DoubleWritableRowKey</code>.
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bytes written.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#decodeFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-"><code>decodeFloat64(PositionedByteRange)</code></a></dd>
</dl>
</li>
</ul>
<a name="decodeFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodeFloat64</h4>
<pre>public static&nbsp;double&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1465">decodeFloat64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Decode a 64-bit floating point value using the fixed-length encoding.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/hadoop/hbase/util/OrderedBytes.html#encodeFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-double-org.apache.hadoop.hbase.util.Order-"><code>encodeFloat64(PositionedByteRange, double, Order)</code></a></dd>
</dl>
</li>
</ul>
<a name="isEncodedValue-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEncodedValue</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1480">isEncodedValue</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Returns true when <code>src</code> appears to be positioned an encoded value, false otherwise.</div>
</li>
</ul>
<a name="isNull-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNull</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1489">isNull</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> is null, false otherwise.</div>
</li>
</ul>
<a name="isNumeric-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNumeric</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1497">isNumeric</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses Numeric encoding, false otherwise.
<code>NaN</code>, <code>+/-Inf</code> are valid Numeric values.</div>
</li>
</ul>
<a name="isNumericInfinite-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNumericInfinite</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1506">isNumericInfinite</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses Numeric encoding and is
<code>Infinite</code>, false otherwise.</div>
</li>
</ul>
<a name="isNumericNaN-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNumericNaN</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1515">isNumericNaN</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses Numeric encoding and is
<code>NaN</code>, false otherwise.</div>
</li>
</ul>
<a name="isNumericZero-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNumericZero</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1523">isNumericZero</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses Numeric encoding and is <code>0</code>,
false otherwise.</div>
</li>
</ul>
<a name="isFixedInt8-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFixedInt8</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1531">isFixedInt8</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Int8 encoding, false
otherwise.</div>
</li>
</ul>
<a name="isFixedInt16-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFixedInt16</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1540">isFixedInt16</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Int16 encoding, false
otherwise.</div>
</li>
</ul>
<a name="isFixedInt32-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFixedInt32</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1549">isFixedInt32</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Int32 encoding, false
otherwise.</div>
</li>
</ul>
<a name="isFixedInt64-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFixedInt64</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1558">isFixedInt64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Int64 encoding, false
otherwise.</div>
</li>
</ul>
<a name="isFixedFloat32-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFixedFloat32</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1567">isFixedFloat32</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Float32 encoding, false
otherwise.</div>
</li>
</ul>
<a name="isFixedFloat64-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFixedFloat64</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1576">isFixedFloat64</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses fixed-width Float64 encoding, false
otherwise.</div>
</li>
</ul>
<a name="isText-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isText</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1584">isText</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses Text encoding, false otherwise.</div>
</li>
</ul>
<a name="isBlobVar-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBlobVar</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1591">isBlobVar</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses BlobVar encoding, false otherwise.</div>
</li>
</ul>
<a name="isBlobCopy-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBlobCopy</h4>
<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1599">isBlobCopy</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Return true when the next encoded value in <code>src</code> uses BlobCopy encoding, false otherwise.</div>
</li>
</ul>
<a name="skip-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skip</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1608">skip</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;src)</pre>
<div class="block">Skip <code>buff</code>'s position forward over one encoded value.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of bytes skipped.</dd>
</dl>
</li>
</ul>
<a name="length-org.apache.hadoop.hbase.util.PositionedByteRange-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>length</h4>
<pre>public static&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/util/OrderedBytes.html#line.1717">length</a>(<a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a>&nbsp;buff)</pre>
<div class="block">Return the number of encoded entries remaining in <code>buff</code>. The state of <code>buff</code> is
not modified through use of this method.</div>
</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/OrderedBytes.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/Order.html" title="enum in org.apache.hadoop.hbase.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/hbase/util/Pair.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/OrderedBytes.html" target="_top">Frames</a></li>
<li><a href="OrderedBytes.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>Nested&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;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>