| <!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>ByteBufferUtils (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ByteBufferUtils (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":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}; |
| 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/ByteBufferUtils.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferArray.BufferIterator.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.ByteVisitor.html" title="interface in org.apache.hadoop.hbase.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/hbase/util/ByteBufferUtils.html" target="_top">Frames</a></li> |
| <li><a href="ByteBufferUtils.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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 ByteBufferUtils" class="title">Class ByteBufferUtils</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.ByteBufferUtils</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Private |
| public final class <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.44">ByteBufferUtils</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 functions for working with byte buffers, such as reading/writing |
| variable-length long numbers.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.ByteVisitor.html" title="interface in org.apache.hadoop.hbase.util">ByteBufferUtils.ByteVisitor</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.Comparer.html" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.Comparer</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.ComparerHolder.html" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.ComparerHolder</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.Converter.html" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.Converter</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.ConverterHolder.html" title="class in org.apache.hadoop.hbase.util">ByteBufferUtils.ConverterHolder</a></span></code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </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>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#NEXT_BIT_MASK">NEXT_BIT_MASK</a></span></code> </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/ByteBufferUtils.html#NEXT_BIT_SHIFT">NEXT_BIT_SHIFT</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>(package private) static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#UNSAFE_AVAIL">UNSAFE_AVAIL</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#UNSAFE_UNALIGNED">UNSAFE_UNALIGNED</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#VALUE_MASK">VALUE_MASK</a></span></code> </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"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colLast" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#ByteBufferUtils--">ByteBufferUtils</a></span>()</code> </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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#arePartsEqual-java.nio.ByteBuffer-int-int-int-int-">arePartsEqual</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offsetLeft, |
| int lengthLeft, |
| int offsetRight, |
| int lengthRight)</code> |
| <div class="block">Check whether two parts in the same buffer are equal.</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/ByteBufferUtils.html#compareTo-byte:A-int-int-java.nio.ByteBuffer-int-int-">compareTo</a></span>(byte[] buf1, |
| int o1, |
| int l1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf2, |
| int o2, |
| int l2)</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#compareTo-java.nio.ByteBuffer-int-int-byte:A-int-int-">compareTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf1, |
| int o1, |
| int l1, |
| byte[] buf2, |
| int o2, |
| int l2)</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#compareTo-java.nio.ByteBuffer-int-int-java.nio.ByteBuffer-int-int-">compareTo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf1, |
| int o1, |
| int l1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf2, |
| int o2, |
| int l2)</code> </td> |
| </tr> |
| <tr id="i4" 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/ByteBufferUtils.html#compareToUnsafe-java.lang.Object-long-int-java.lang.Object-long-int-">compareToUnsafe</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj1, |
| long o1, |
| int l1, |
| <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> obj2, |
| long o2, |
| int l2)</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyBufferToStream-java.io.DataOutput-java.nio.ByteBuffer-int-int-">copyBufferToStream</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int offset, |
| int length)</code> |
| <div class="block">Copy data from a buffer to an output stream.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyBufferToStream-java.io.OutputStream-java.nio.ByteBuffer-int-int-">copyBufferToStream</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int offset, |
| int length)</code> |
| <div class="block">Copy data from a buffer to an output stream.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyFromArrayToBuffer-java.nio.ByteBuffer-byte:A-int-int-">copyFromArrayToBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| byte[] in, |
| int inOffset, |
| int length)</code> |
| <div class="block">Copies the bytes from given array's offset to length part into the given buffer.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyFromArrayToBuffer-java.nio.ByteBuffer-int-byte:A-int-int-">copyFromArrayToBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| int outOffset, |
| byte[] in, |
| int inOffset, |
| int length)</code> |
| <div class="block">Copies bytes from given array's offset to length part into the given buffer.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyFromBufferToArray-byte:A-java.nio.ByteBuffer-int-int-int-">copyFromBufferToArray</a></span>(byte[] out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int sourceOffset, |
| int destinationOffset, |
| int length)</code> |
| <div class="block">Copies specified number of bytes from given offset of 'in' ByteBuffer to |
| the array.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyFromBufferToBuffer-java.nio.ByteBuffer-java.nio.ByteBuffer-">copyFromBufferToBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out)</code> |
| <div class="block">Copy one buffer's whole data to another.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyFromBufferToBuffer-java.nio.ByteBuffer-java.nio.ByteBuffer-int-int-">copyFromBufferToBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| int sourceOffset, |
| int length)</code> |
| <div class="block">Copy from one buffer to another from given offset.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyFromBufferToBuffer-java.nio.ByteBuffer-java.nio.ByteBuffer-int-int-int-">copyFromBufferToBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| int sourceOffset, |
| int destinationOffset, |
| int length)</code> |
| <div class="block">Copy from one buffer to another from given offset.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyFromStreamToBuffer-java.nio.ByteBuffer-java.io.DataInputStream-int-">copyFromStreamToBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInputStream.html?is-external=true" title="class or interface in java.io">DataInputStream</a> in, |
| int length)</code> |
| <div class="block">Copy the given number of bytes from the given stream and put it at the |
| current position of the given buffer, updating the position in the buffer.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#copyOfRange-java.nio.ByteBuffer-int-int-">copyOfRange</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> original, |
| int from, |
| int to)</code> |
| <div class="block">Similar to <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html?is-external=true#copyOfRange-byte:A-int-int-" title="class or interface in java.util"><code>Arrays.copyOfRange(byte[], int, int)</code></a></div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#drainInputStreamToBuffer-java.io.InputStream-">drainInputStreamToBuffer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> is)</code> |
| <div class="block">Copy from the InputStream to a new heap ByteBuffer until the InputStream is exhausted.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#equals-java.nio.ByteBuffer-int-int-byte:A-int-int-">equals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf1, |
| int o1, |
| int l1, |
| byte[] buf2, |
| int o2, |
| int l2)</code> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#equals-java.nio.ByteBuffer-int-int-java.nio.ByteBuffer-int-int-">equals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf1, |
| int o1, |
| int l1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf2, |
| int o2, |
| int l2)</code> </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#extendLimit-java.nio.ByteBuffer-int-">extendLimit</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int numBytes)</code> </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/ByteBufferUtils.html#findCommonPrefix-byte:A-int-int-byte:A-int-int-">findCommonPrefix</a></span>(byte[] left, |
| int leftOffset, |
| int leftLength, |
| byte[] right, |
| int rightOffset, |
| int rightLength)</code> |
| <div class="block">Find length of common prefix in two arrays.</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/ByteBufferUtils.html#findCommonPrefix-java.nio.ByteBuffer-int-int-java.nio.ByteBuffer-int-int-">findCommonPrefix</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> left, |
| int leftOffset, |
| int leftLength, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> right, |
| int rightOffset, |
| int rightLength)</code> |
| <div class="block">Find length of common prefix in two arrays.</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/ByteBufferUtils.html#hashCode-java.nio.ByteBuffer-int-int-">hashCode</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf, |
| int offset, |
| int length)</code> </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/ByteBufferUtils.html#intFitsIn-int-">intFitsIn</a></span>(int value)</code> |
| <div class="block">Check how many bytes is required to store value.</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/ByteBufferUtils.html#longFitsIn-long-">longFitsIn</a></span>(long value)</code> |
| <div class="block">Check how many bytes are required to store value.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#moveBufferToStream-java.io.OutputStream-java.nio.ByteBuffer-int-">moveBufferToStream</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int length)</code> |
| <div class="block">Copy the data to the output stream and update position in buffer.</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/ByteBufferUtils.html#putAsShort-java.nio.ByteBuffer-int-int-">putAsShort</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf, |
| int index, |
| int val)</code> </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/ByteBufferUtils.html#putByte-java.nio.ByteBuffer-int-byte-">putByte</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset, |
| byte b)</code> </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/ByteBufferUtils.html#putCompressedInt-java.io.OutputStream-int-">putCompressedInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| int value)</code> |
| <div class="block">Put in buffer integer using 7 bit encoding.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#putInt-java.nio.ByteBuffer-int-">putInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int val)</code> |
| <div class="block">Put an int value out to the given ByteBuffer's current position in big-endian format.</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/ByteBufferUtils.html#putInt-java.nio.ByteBuffer-int-int-">putInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int index, |
| int val)</code> </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#putInt-java.io.OutputStream-int-">putInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| int value)</code> |
| <div class="block">Put in output stream 32 bit integer (Big Endian byte order).</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#putLong-java.nio.ByteBuffer-int-long-">putLong</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int index, |
| long val)</code> </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#putLong-java.nio.ByteBuffer-long-">putLong</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| long val)</code> |
| <div class="block">Put a long value out to the given ByteBuffer's current position in big-endian format.</div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#putLong-java.io.OutputStream-long-int-">putLong</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| long value, |
| int fitInBytes)</code> </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#putShort-java.nio.ByteBuffer-int-short-">putShort</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int index, |
| short val)</code> </td> |
| </tr> |
| <tr id="i35" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#putShort-java.nio.ByteBuffer-short-">putShort</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| short val)</code> |
| <div class="block">Put a short value out to the given ByteBuffer's current position in big-endian format.</div> |
| </td> |
| </tr> |
| <tr id="i36" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#readAsInt-java.nio.ByteBuffer-int-int-">readAsInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf, |
| int offset, |
| int length)</code> |
| <div class="block">Converts a ByteBuffer to an int value</div> |
| </td> |
| </tr> |
| <tr id="i37" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#readCompressedInt-java.nio.ByteBuffer-">readCompressedInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer)</code> |
| <div class="block">Read integer from buffer coded in 7 bits and increment position.</div> |
| </td> |
| </tr> |
| <tr id="i38" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#readCompressedInt-java.io.InputStream-">readCompressedInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input)</code> |
| <div class="block">Read integer from stream coded in 7 bits and increment position.</div> |
| </td> |
| </tr> |
| <tr id="i39" class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#readLong-java.nio.ByteBuffer-int-">readLong</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int fitInBytes)</code> |
| <div class="block">Read long which was written to fitInBytes bytes and increment position.</div> |
| </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#readLong-java.io.InputStream-int-">readLong</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, |
| int fitInBytes)</code> |
| <div class="block">Read long which was written to fitInBytes bytes and increment position.</div> |
| </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#readVLong-org.apache.hadoop.hbase.nio.ByteBuff-">readVLong</a></span>(<a href="../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a> in)</code> |
| <div class="block">Similar to <code>WritableUtils.readVLong(java.io.DataInput)</code> but reads from a |
| <a href="../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio"><code>ByteBuff</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i42" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#readVLong-java.nio.ByteBuffer-">readVLong</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in)</code> |
| <div class="block">Similar to <code>WritableUtils.readVLong(DataInput)</code> but reads from a <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><code>ByteBuffer</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i43" class="rowColor"> |
| <td class="colFirst"><code>private static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#readVLong-org.apache.hadoop.hbase.util.ByteBufferUtils.ByteVisitor-">readVLong</a></span>(<a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.ByteVisitor.html" title="interface in org.apache.hadoop.hbase.util">ByteBufferUtils.ByteVisitor</a> visitor)</code> </td> |
| </tr> |
| <tr id="i44" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#skip-java.nio.ByteBuffer-int-">skip</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int length)</code> |
| <div class="block">Increment position in buffer.</div> |
| </td> |
| </tr> |
| <tr id="i45" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math">BigDecimal</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toBigDecimal-java.nio.ByteBuffer-int-int-">toBigDecimal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset, |
| int length)</code> |
| <div class="block">Reads a BigDecimal value at the given buffer's offset.</div> |
| </td> |
| </tr> |
| <tr id="i46" class="altColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toByte-java.nio.ByteBuffer-int-">toByte</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</code> </td> |
| </tr> |
| <tr id="i47" class="rowColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toBytes-java.nio.ByteBuffer-int-">toBytes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int startPosition)</code> |
| <div class="block">Copy the bytes from position to limit into a new byte[] of the exact length and sets the |
| position and limit back to their original values (though not thread safe).</div> |
| </td> |
| </tr> |
| <tr id="i48" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toBytes-java.nio.ByteBuffer-int-int-">toBytes</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset, |
| int length)</code> |
| <div class="block">Copy the given number of bytes from specified offset into a new byte[]</div> |
| </td> |
| </tr> |
| <tr id="i49" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toDouble-java.nio.ByteBuffer-int-">toDouble</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</code> |
| <div class="block">Reads a double value at the given buffer's offset.</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/ByteBufferUtils.html#toInt-java.nio.ByteBuffer-">toInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer)</code> |
| <div class="block">Reads an int value at the given buffer's current position.</div> |
| </td> |
| </tr> |
| <tr id="i51" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toInt-java.nio.ByteBuffer-int-">toInt</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</code> |
| <div class="block">Reads an int value at the given buffer's offset.</div> |
| </td> |
| </tr> |
| <tr id="i52" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toLong-java.nio.ByteBuffer-int-">toLong</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</code> |
| <div class="block">Reads a long value at the given buffer's offset.</div> |
| </td> |
| </tr> |
| <tr id="i53" class="rowColor"> |
| <td class="colFirst"><code>static short</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toShort-java.nio.ByteBuffer-int-">toShort</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</code> |
| <div class="block">Reads a short value at the given buffer's offset.</div> |
| </td> |
| </tr> |
| <tr id="i54" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#toStringBinary-java.nio.ByteBuffer-">toStringBinary</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> b)</code> </td> |
| </tr> |
| <tr id="i55" 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/ByteBufferUtils.html#toStringBinary-java.nio.ByteBuffer-int-int-">toStringBinary</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> b, |
| int off, |
| int len)</code> </td> |
| </tr> |
| <tr id="i56" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.html#writeVLong-java.nio.ByteBuffer-long-">writeVLong</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| long i)</code> |
| <div class="block">Similar to <code>WritableUtils.writeVLong(java.io.DataOutput, long)</code>, |
| but writes to a <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><code>ByteBuffer</code></a>.</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 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="VALUE_MASK"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>VALUE_MASK</h4> |
| <pre>public static final int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.46">VALUE_MASK</a></pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.ByteBufferUtils.VALUE_MASK">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NEXT_BIT_SHIFT"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NEXT_BIT_SHIFT</h4> |
| <pre>public static final int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.47">NEXT_BIT_SHIFT</a></pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.ByteBufferUtils.NEXT_BIT_SHIFT">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NEXT_BIT_MASK"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NEXT_BIT_MASK</h4> |
| <pre>public static final int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.48">NEXT_BIT_MASK</a></pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.util.ByteBufferUtils.NEXT_BIT_MASK">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="UNSAFE_AVAIL"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>UNSAFE_AVAIL</h4> |
| <pre>static final boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.49">UNSAFE_AVAIL</a></pre> |
| </li> |
| </ul> |
| <a name="UNSAFE_UNALIGNED"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>UNSAFE_UNALIGNED</h4> |
| <pre>public static final boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.50">UNSAFE_UNALIGNED</a></pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="ByteBufferUtils--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ByteBufferUtils</h4> |
| <pre>private <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.52">ByteBufferUtils</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="writeVLong-java.nio.ByteBuffer-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeVLong</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.319">writeVLong</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| long i)</pre> |
| <div class="block">Similar to <code>WritableUtils.writeVLong(java.io.DataOutput, long)</code>, |
| but writes to a <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><code>ByteBuffer</code></a>.</div> |
| </li> |
| </ul> |
| <a name="readVLong-org.apache.hadoop.hbase.util.ByteBufferUtils.ByteVisitor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readVLong</h4> |
| <pre>private static long <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.352">readVLong</a>(<a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.ByteVisitor.html" title="interface in org.apache.hadoop.hbase.util">ByteBufferUtils.ByteVisitor</a> visitor)</pre> |
| </li> |
| </ul> |
| <a name="readVLong-java.nio.ByteBuffer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readVLong</h4> |
| <pre>public static long <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.370">readVLong</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in)</pre> |
| <div class="block">Similar to <code>WritableUtils.readVLong(DataInput)</code> but reads from a <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio"><code>ByteBuffer</code></a>.</div> |
| </li> |
| </ul> |
| <a name="readVLong-org.apache.hadoop.hbase.nio.ByteBuff-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readVLong</h4> |
| <pre>public static long <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.378">readVLong</a>(<a href="../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a> in)</pre> |
| <div class="block">Similar to <code>WritableUtils.readVLong(java.io.DataInput)</code> but reads from a |
| <a href="../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio"><code>ByteBuff</code></a>.</div> |
| </li> |
| </ul> |
| <a name="putCompressedInt-java.io.OutputStream-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putCompressedInt</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.391">putCompressedInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| int value) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Put in buffer integer using 7 bit encoding. For each written byte: |
| 7 bits are used to store value |
| 1 bit is used to indicate whether there is next bit.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - Int to be compressed.</dd> |
| <dd><code>out</code> - Where to put compressed data</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>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/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on stream error</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putInt-java.io.OutputStream-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putInt</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.413">putInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| int value) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Put in output stream 32 bit integer (Big Endian byte order).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - Where to put integer.</dd> |
| <dd><code>value</code> - Value of integer.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - On stream error.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toByte-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toByte</h4> |
| <pre>public static byte <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.425">toByte</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</pre> |
| </li> |
| </ul> |
| <a name="moveBufferToStream-java.io.OutputStream-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>moveBufferToStream</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.439">moveBufferToStream</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int length) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Copy the data to the output stream and update position in buffer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - the stream to write bytes to</dd> |
| <dd><code>in</code> - the buffer to read bytes from</dd> |
| <dd><code>length</code> - the number of bytes to copy</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyBufferToStream-java.io.OutputStream-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyBufferToStream</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.454">copyBufferToStream</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int offset, |
| int length) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Copy data from a buffer to an output stream. Does not update the position |
| in the buffer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - the stream to write bytes to</dd> |
| <dd><code>in</code> - the buffer to read bytes from</dd> |
| <dd><code>offset</code> - the offset in the buffer (from the buffer's array offset) |
| to start copying bytes from</dd> |
| <dd><code>length</code> - the number of bytes to copy</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyBufferToStream-java.io.DataOutput-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyBufferToStream</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.476">copyBufferToStream</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int offset, |
| int length) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Copy data from a buffer to an output stream. Does not update the position |
| in the buffer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - the output stream to write bytes to</dd> |
| <dd><code>in</code> - the buffer to read bytes from</dd> |
| <dd><code>offset</code> - the offset in the buffer (from the buffer's array offset) |
| to start copying bytes from</dd> |
| <dd><code>length</code> - the number of bytes to copy</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putLong-java.io.OutputStream-long-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putLong</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.489">putLong</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, |
| long value, |
| int fitInBytes) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putByte-java.nio.ByteBuffer-int-byte-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putByte</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.499">putByte</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset, |
| byte b)</pre> |
| </li> |
| </ul> |
| <a name="longFitsIn-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>longFitsIn</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.513">longFitsIn</a>(long value)</pre> |
| <div class="block">Check how many bytes are required to store value.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - Value which size will be tested.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>How many bytes are required to store value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="intFitsIn-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intFitsIn</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.549">intFitsIn</a>(int value)</pre> |
| <div class="block">Check how many bytes is required to store value.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - Value which size will be tested.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>How many bytes are required to store value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="readCompressedInt-java.io.InputStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readCompressedInt</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.571">readCompressedInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> input) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Read integer from stream coded in 7 bits and increment position.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the integer that has been read</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="readCompressedInt-java.nio.ByteBuffer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readCompressedInt</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.592">readCompressedInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer)</pre> |
| <div class="block">Read integer from buffer coded in 7 bits and increment position.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Read integer.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="readLong-java.io.InputStream-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readLong</h4> |
| <pre>public static long <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.606">readLong</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in, |
| int fitInBytes) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Read long which was written to fitInBytes bytes and increment position.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fitInBytes</code> - In how many bytes given long is stored.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The value of parsed long.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="readLong-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readLong</h4> |
| <pre>public static long <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.620">readLong</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int fitInBytes)</pre> |
| <div class="block">Read long which was written to fitInBytes bytes and increment position.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fitInBytes</code> - In how many bytes given long is stored.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The value of parsed long.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyFromStreamToBuffer-java.nio.ByteBuffer-java.io.DataInputStream-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyFromStreamToBuffer</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.635">copyFromStreamToBuffer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/DataInputStream.html?is-external=true" title="class or interface in java.io">DataInputStream</a> in, |
| int length) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Copy the given number of bytes from the given stream and put it at the |
| current position of the given buffer, updating the position in the buffer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - the buffer to write data to</dd> |
| <dd><code>in</code> - the stream to read data from</dd> |
| <dd><code>length</code> - the number of bytes to read/write</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="drainInputStreamToBuffer-java.io.InputStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>drainInputStreamToBuffer</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.651">drainInputStreamToBuffer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> is) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Copy from the InputStream to a new heap ByteBuffer until the InputStream is exhausted.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyFromBufferToBuffer-java.nio.ByteBuffer-java.nio.ByteBuffer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyFromBufferToBuffer</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.666">copyFromBufferToBuffer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out)</pre> |
| <div class="block">Copy one buffer's whole data to another. Write starts at the current position of 'out' buffer. |
| Note : This will advance the position marker of <code>out</code> and also change the position maker |
| for <code>in</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>in</code> - source buffer</dd> |
| <dd><code>out</code> - destination buffer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyFromBufferToBuffer-java.nio.ByteBuffer-java.nio.ByteBuffer-int-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyFromBufferToBuffer</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.691">copyFromBufferToBuffer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| int sourceOffset, |
| int destinationOffset, |
| int length)</pre> |
| <div class="block">Copy from one buffer to another from given offset. This will be absolute positional copying and |
| won't affect the position of any of the buffers.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>in</code> - </dd> |
| <dd><code>out</code> - </dd> |
| <dd><code>sourceOffset</code> - </dd> |
| <dd><code>destinationOffset</code> - </dd> |
| <dd><code>length</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyFromBufferToBuffer-java.nio.ByteBuffer-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyFromBufferToBuffer</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.718">copyFromBufferToBuffer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| int sourceOffset, |
| int length)</pre> |
| <div class="block">Copy from one buffer to another from given offset. |
| <p> |
| Note : This will advance the position marker of <code>out</code> but not change the position maker |
| for <code>in</code></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>in</code> - source buffer</dd> |
| <dd><code>out</code> - destination buffer</dd> |
| <dd><code>sourceOffset</code> - offset in the source buffer</dd> |
| <dd><code>length</code> - how many bytes to copy</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findCommonPrefix-byte:A-int-int-byte:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findCommonPrefix</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.743">findCommonPrefix</a>(byte[] left, |
| int leftOffset, |
| int leftLength, |
| byte[] right, |
| int rightOffset, |
| int rightLength)</pre> |
| <div class="block">Find length of common prefix in two arrays.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>left</code> - Array to be compared.</dd> |
| <dd><code>leftOffset</code> - Offset in left array.</dd> |
| <dd><code>leftLength</code> - Length of left array.</dd> |
| <dd><code>right</code> - Array to be compared.</dd> |
| <dd><code>rightOffset</code> - Offset in right array.</dd> |
| <dd><code>rightLength</code> - Length of right array.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="findCommonPrefix-java.nio.ByteBuffer-int-int-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findCommonPrefix</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.766">findCommonPrefix</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> left, |
| int leftOffset, |
| int leftLength, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> right, |
| int rightOffset, |
| int rightLength)</pre> |
| <div class="block">Find length of common prefix in two arrays.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>left</code> - ByteBuffer to be compared.</dd> |
| <dd><code>leftOffset</code> - Offset in left ByteBuffer.</dd> |
| <dd><code>leftLength</code> - Length of left ByteBuffer.</dd> |
| <dd><code>right</code> - ByteBuffer to be compared.</dd> |
| <dd><code>rightOffset</code> - Offset in right ByteBuffer.</dd> |
| <dd><code>rightLength</code> - Length of right ByteBuffer.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="arePartsEqual-java.nio.ByteBuffer-int-int-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>arePartsEqual</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.788">arePartsEqual</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offsetLeft, |
| int lengthLeft, |
| int offsetRight, |
| int lengthRight)</pre> |
| <div class="block">Check whether two parts in the same buffer are equal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - In which buffer there are parts</dd> |
| <dd><code>offsetLeft</code> - Beginning of first part.</dd> |
| <dd><code>lengthLeft</code> - Length of the first part.</dd> |
| <dd><code>offsetRight</code> - Beginning of the second part.</dd> |
| <dd><code>lengthRight</code> - Length of the second part.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>True if equal</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="skip-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>skip</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.814">skip</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int length)</pre> |
| <div class="block">Increment position in buffer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - In this buffer.</dd> |
| <dd><code>length</code> - By that many bytes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="extendLimit-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extendLimit</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.818">extendLimit</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int numBytes)</pre> |
| </li> |
| </ul> |
| <a name="toBytes-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toBytes</h4> |
| <pre>public static byte[] <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.829">toBytes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int startPosition)</pre> |
| <div class="block">Copy the bytes from position to limit into a new byte[] of the exact length and sets the |
| position and limit back to their original values (though not thread safe).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - copy from here</dd> |
| <dd><code>startPosition</code> - put buffer.get(startPosition) into byte[0]</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new byte[] containing the bytes in the specified range</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toBytes-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toBytes</h4> |
| <pre>public static byte[] <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.845">toBytes</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset, |
| int length)</pre> |
| <div class="block">Copy the given number of bytes from specified offset into a new byte[]</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - </dd> |
| <dd><code>offset</code> - </dd> |
| <dd><code>length</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new byte[] containing the bytes in the specified range</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="equals-java.nio.ByteBuffer-int-int-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.853">equals</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf1, |
| int o1, |
| int l1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf2, |
| int o2, |
| int l2)</pre> |
| </li> |
| </ul> |
| <a name="hashCode-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.873">hashCode</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf, |
| int offset, |
| int length)</pre> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buf</code> - ByteBuffer to hash</dd> |
| <dd><code>offset</code> - offset to start from</dd> |
| <dd><code>length</code> - length to hash</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="compareTo-java.nio.ByteBuffer-int-int-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compareTo</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.881">compareTo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf1, |
| int o1, |
| int l1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf2, |
| int o2, |
| int l2)</pre> |
| </li> |
| </ul> |
| <a name="equals-java.nio.ByteBuffer-int-int-byte:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.885">equals</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf1, |
| int o1, |
| int l1, |
| byte[] buf2, |
| int o2, |
| int l2)</pre> |
| </li> |
| </ul> |
| <a name="compareTo-byte:A-int-int-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compareTo</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.902">compareTo</a>(byte[] buf1, |
| int o1, |
| int l1, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf2, |
| int o2, |
| int l2)</pre> |
| </li> |
| </ul> |
| <a name="compareTo-java.nio.ByteBuffer-int-int-byte:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compareTo</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.906">compareTo</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf1, |
| int o1, |
| int l1, |
| byte[] buf2, |
| int o2, |
| int l2)</pre> |
| </li> |
| </ul> |
| <a name="compareToUnsafe-java.lang.Object-long-int-java.lang.Object-long-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compareToUnsafe</h4> |
| <pre>static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.910">compareToUnsafe</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj1, |
| long o1, |
| int l1, |
| <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> obj2, |
| long o2, |
| int l2)</pre> |
| </li> |
| </ul> |
| <a name="toShort-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toShort</h4> |
| <pre>public static short <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.959">toShort</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</pre> |
| <div class="block">Reads a short value at the given buffer's offset.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - </dd> |
| <dd><code>offset</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>short value at offset</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toInt-java.nio.ByteBuffer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toInt</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.966">toInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer)</pre> |
| <div class="block">Reads an int value at the given buffer's current position. Also advances the buffer's position</div> |
| </li> |
| </ul> |
| <a name="toInt-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toInt</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.976">toInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</pre> |
| <div class="block">Reads an int value at the given buffer's offset.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - </dd> |
| <dd><code>offset</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>int value at offset</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="readAsInt-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readAsInt</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.990">readAsInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf, |
| int offset, |
| int length)</pre> |
| <div class="block">Converts a ByteBuffer to an int value</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buf</code> - The ByteBuffer</dd> |
| <dd><code>offset</code> - Offset to int value</dd> |
| <dd><code>length</code> - Number of bytes used to store the int value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the int value</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if there's not enough bytes left in the buffer after the given offset</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toLong-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toLong</h4> |
| <pre>public static long <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1009">toLong</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</pre> |
| <div class="block">Reads a long value at the given buffer's offset.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - </dd> |
| <dd><code>offset</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>long value at offset</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putInt-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putInt</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1019">putInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int val)</pre> |
| <div class="block">Put an int value out to the given ByteBuffer's current position in big-endian format. |
| This also advances the position in buffer by int size.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - the ByteBuffer to write to</dd> |
| <dd><code>val</code> - int to write out</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putInt-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putInt</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1023">putInt</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int index, |
| int val)</pre> |
| </li> |
| </ul> |
| <a name="toDouble-java.nio.ByteBuffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toDouble</h4> |
| <pre>public static double <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1033">toDouble</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset)</pre> |
| <div class="block">Reads a double value at the given buffer's offset.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - </dd> |
| <dd><code>offset</code> - offset where double is</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>double value at offset</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toBigDecimal-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toBigDecimal</h4> |
| <pre>public 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> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1043">toBigDecimal</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int offset, |
| int length)</pre> |
| <div class="block">Reads a BigDecimal value at the given buffer's offset.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - </dd> |
| <dd><code>offset</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>BigDecimal value at offset</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putShort-java.nio.ByteBuffer-short-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putShort</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1061">putShort</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| short val)</pre> |
| <div class="block">Put a short value out to the given ByteBuffer's current position in big-endian format. |
| This also advances the position in buffer by short size.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - the ByteBuffer to write to</dd> |
| <dd><code>val</code> - short to write out</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putShort-java.nio.ByteBuffer-int-short-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putShort</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1065">putShort</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int index, |
| short val)</pre> |
| </li> |
| </ul> |
| <a name="putAsShort-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putAsShort</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1069">putAsShort</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf, |
| int index, |
| int val)</pre> |
| </li> |
| </ul> |
| <a name="putLong-java.nio.ByteBuffer-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putLong</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1082">putLong</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| long val)</pre> |
| <div class="block">Put a long value out to the given ByteBuffer's current position in big-endian format. |
| This also advances the position in buffer by long size.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - the ByteBuffer to write to</dd> |
| <dd><code>val</code> - long to write out</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="putLong-java.nio.ByteBuffer-int-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putLong</h4> |
| <pre>public static int <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1086">putLong</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buffer, |
| int index, |
| long val)</pre> |
| </li> |
| </ul> |
| <a name="copyFromArrayToBuffer-java.nio.ByteBuffer-byte:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyFromArrayToBuffer</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1098">copyFromArrayToBuffer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| byte[] in, |
| int inOffset, |
| int length)</pre> |
| <div class="block">Copies the bytes from given array's offset to length part into the given buffer. Puts the bytes |
| to buffer's current position. This also advances the position in the 'out' buffer by 'length'</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - </dd> |
| <dd><code>in</code> - </dd> |
| <dd><code>inOffset</code> - </dd> |
| <dd><code>length</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyFromArrayToBuffer-java.nio.ByteBuffer-int-byte:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyFromArrayToBuffer</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1120">copyFromArrayToBuffer</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> out, |
| int outOffset, |
| byte[] in, |
| int inOffset, |
| int length)</pre> |
| <div class="block">Copies bytes from given array's offset to length part into the given buffer. Puts the bytes |
| to buffer's given position. This doesn't affact the position of buffer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - </dd> |
| <dd><code>in</code> - </dd> |
| <dd><code>inOffset</code> - </dd> |
| <dd><code>length</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyFromBufferToArray-byte:A-java.nio.ByteBuffer-int-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyFromBufferToArray</h4> |
| <pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1142">copyFromBufferToArray</a>(byte[] out, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> in, |
| int sourceOffset, |
| int destinationOffset, |
| int length)</pre> |
| <div class="block">Copies specified number of bytes from given offset of 'in' ByteBuffer to |
| the array. This doesn't affact the position of buffer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>out</code> - </dd> |
| <dd><code>in</code> - </dd> |
| <dd><code>sourceOffset</code> - </dd> |
| <dd><code>destinationOffset</code> - </dd> |
| <dd><code>length</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyOfRange-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyOfRange</h4> |
| <pre>public static byte[] <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1162">copyOfRange</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> original, |
| int from, |
| int to)</pre> |
| <div class="block">Similar to <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html?is-external=true#copyOfRange-byte:A-int-int-" title="class or interface in java.util"><code>Arrays.copyOfRange(byte[], int, int)</code></a></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>original</code> - the buffer from which the copy has to happen</dd> |
| <dd><code>from</code> - the starting index</dd> |
| <dd><code>to</code> - the ending index</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a byte[] created out of the copy</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toStringBinary-java.nio.ByteBuffer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toStringBinary</h4> |
| <pre>public 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> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1171">toStringBinary</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> b, |
| int off, |
| int len)</pre> |
| </li> |
| </ul> |
| <a name="toStringBinary-java.nio.ByteBuffer-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toStringBinary</h4> |
| <pre>public 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> <a href="../../../../../src-html/org/apache/hadoop/hbase/util/ByteBufferUtils.html#line.1190">toStringBinary</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> b)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ByteBufferUtils.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferArray.BufferIterator.html" title="class in org.apache.hadoop.hbase.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/hbase/util/ByteBufferUtils.ByteVisitor.html" title="interface in org.apache.hadoop.hbase.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/hbase/util/ByteBufferUtils.html" target="_top">Frames</a></li> |
| <li><a href="ByteBufferUtils.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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 © 2007–2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |