| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>ByteRange (Apache HBase 1.2.12 API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ByteRange (Apache HBase 1.2.12 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/ByteRange.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/ByteBufferUtils.html" title="class in org.apache.hadoop.hbase.util"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/hbase/util/ByteRangeUtils.html" title="class in org.apache.hadoop.hbase.util"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/hbase/util/ByteRange.html" target="_top">Frames</a></li> |
| <li><a href="ByteRange.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>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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="Interface ByteRange" class="title">Interface ByteRange</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a>></dd> |
| </dl> |
| <dl> |
| <dt>All Known Subinterfaces:</dt> |
| <dd><a href="../../../../../org/apache/hadoop/hbase/util/PositionedByteRange.html" title="interface in org.apache.hadoop.hbase.util">PositionedByteRange</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd>org.apache.hadoop.hbase.util.AbstractByteRange, org.apache.hadoop.hbase.util.AbstractPositionedByteRange, <a href="../../../../../org/apache/hadoop/hbase/util/SimpleByteRange.html" title="class in org.apache.hadoop.hbase.util">SimpleByteRange</a>, <a href="../../../../../org/apache/hadoop/hbase/util/SimpleMutableByteRange.html" title="class in org.apache.hadoop.hbase.util">SimpleMutableByteRange</a>, <a href="../../../../../org/apache/hadoop/hbase/util/SimplePositionedByteRange.html" title="class in org.apache.hadoop.hbase.util">SimplePositionedByteRange</a>, <a href="../../../../../org/apache/hadoop/hbase/util/SimplePositionedMutableByteRange.html" title="class in org.apache.hadoop.hbase.util">SimplePositionedMutableByteRange</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Evolving |
| public interface <span class="strong">ByteRange</span> |
| extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a>></pre> |
| <div class="block">Lightweight, reusable class for specifying ranges of byte[]'s. |
| <p> |
| <code>ByteRange</code> maintains an underlying byte[] and a viewport into that |
| byte[] as a range of bytes. The <code>ByteRange</code> is a mutable, reusable |
| object, so the underlying byte[] can be modified after instantiation. This |
| is done using the <a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#set(byte[])"><code>set(byte[])</code></a> and <a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#unset()"><code>unset()</code></a> methods. Direct |
| access to the byte[] is also available via <a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getBytes()"><code>getBytes()</code></a>. The viewport |
| is defined by an <code>offset</code> into the byte[] and a <code>length</code>. The |
| range of bytes is 0-indexed, and is accessed by index via the |
| <a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#get(int)"><code>get(int)</code></a> and <a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#put(int,%20byte)"><code>put(int, byte)</code></a> methods. |
| </p> |
| <p> |
| This interface differs from ByteBuffer: |
| </p> |
| <ul> |
| <li>On-heap bytes only</li> |
| <li>Raw <code>byte</code> access only; does not encode other primitives.</li> |
| <li>Implements <code>equals(Object)</code>, <code>#hashCode()</code>, and |
| <code>#compareTo(ByteRange)</code> so that it can be used in standard java |
| Collections. Comparison operations are lexicographic, which is native to |
| HBase.</li> |
| <li>Allows the addition of simple core methods like the deep and shallow |
| copy methods.</li> |
| <li>Can be reused in tight loops like a major compaction which can save |
| significant amounts of garbage. (Without reuse, we throw off garbage like |
| <a href="http://www.youtube.com/watch?v=lkmBH-MjZF4">this thing</a>.)</li> |
| </ul> |
| <p> |
| Mutable, and always evaluates <code>#equals(Object)</code>, <code>#hashCode()</code>, |
| and <code>#compareTo(ByteRange)</code> based on the current contents. |
| </p> |
| <p> |
| Can contain convenience methods for comparing, printing, cloning, spawning |
| new arrays, copying to other arrays, etc. Please place non-core methods into |
| <a href="../../../../../org/apache/hadoop/hbase/util/ByteRangeUtils.html" title="class in org.apache.hadoop.hbase.util"><code>ByteRangeUtils</code></a>. |
| </p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#deepCopy()">deepCopy</a></strong>()</code> |
| <div class="block">Create a new <code>ByteRange</code> with new backing byte[] containing a copy |
| of the content from <code>this</code> range's window.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#deepCopySubRangeTo(int,%20int,%20byte[],%20int)">deepCopySubRangeTo</a></strong>(int innerOffset, |
| int copyLength, |
| byte[] destination, |
| int destinationOffset)</code> |
| <div class="block">Wrapper for System.arraycopy.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#deepCopyTo(byte[],%20int)">deepCopyTo</a></strong>(byte[] destination, |
| int destinationOffset)</code> |
| <div class="block">Wrapper for System.arraycopy.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#deepCopyToNewArray()">deepCopyToNewArray</a></strong>()</code> |
| <div class="block">Instantiate a new byte[] with exact length, which is at least 24 bytes + |
| length.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>byte</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#get(int)">get</a></strong>(int index)</code> |
| <div class="block">Retrieve the byte at <code>index</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#get(int,%20byte[])">get</a></strong>(int index, |
| byte[] dst)</code> |
| <div class="block">Fill <code>dst</code> with bytes from the range, starting from <code>index</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#get(int,%20byte[],%20int,%20int)">get</a></strong>(int index, |
| byte[] dst, |
| int offset, |
| int length)</code> |
| <div class="block">Fill <code>dst</code> with bytes from the range, starting from <code>index</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getBytes()">getBytes</a></strong>()</code> |
| <div class="block">The underlying byte[].</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getInt(int)">getInt</a></strong>(int index)</code> |
| <div class="block">Retrieve the int value at <code>index</code></div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getLength()">getLength</a></strong>()</code> |
| <div class="block">The length of the range.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getLong(int)">getLong</a></strong>(int index)</code> |
| <div class="block">Retrieve the long value at <code>index</code></div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getOffset()">getOffset</a></strong>()</code> |
| <div class="block">The offset, the index into the underlying byte[] at which this range |
| begins.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>short</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getShort(int)">getShort</a></strong>(int index)</code> |
| <div class="block">Retrieve the short value at <code>index</code></div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getVLong(int)">getVLong</a></strong>(int index)</code> |
| <div class="block">Retrieve the long value at <code>index</code> which is stored as VLong</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#isEmpty()">isEmpty</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#put(int,%20byte)">put</a></strong>(int index, |
| byte val)</code> |
| <div class="block">Store <code>val</code> at <code>index</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#put(int,%20byte[])">put</a></strong>(int index, |
| byte[] val)</code> |
| <div class="block">Store <code>val</code> at <code>index</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#put(int,%20byte[],%20int,%20int)">put</a></strong>(int index, |
| byte[] val, |
| int offset, |
| int length)</code> |
| <div class="block">Store <code>length</code> bytes from <code>val</code> into this range, starting at |
| <code>index</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#putInt(int,%20int)">putInt</a></strong>(int index, |
| int val)</code> |
| <div class="block">Store the int value at <code>index</code></div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#putLong(int,%20long)">putLong</a></strong>(int index, |
| long val)</code> |
| <div class="block">Store the long value at <code>index</code></div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#putShort(int,%20short)">putShort</a></strong>(int index, |
| short val)</code> |
| <div class="block">Store the short value at <code>index</code></div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#putVLong(int,%20long)">putVLong</a></strong>(int index, |
| long val)</code> |
| <div class="block">Store the long value at <code>index</code> as a VLong</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#set(byte[])">set</a></strong>(byte[] bytes)</code> |
| <div class="block">Reuse this <code>ByteRange</code> over a new byte[].</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#set(byte[],%20int,%20int)">set</a></strong>(byte[] bytes, |
| int offset, |
| int length)</code> |
| <div class="block">Reuse this <code>ByteRange</code> over a new byte[].</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#set(int)">set</a></strong>(int capacity)</code> |
| <div class="block">Reuse this <code>ByteRange</code> over a new byte[].</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#setLength(int)">setLength</a></strong>(int length)</code> |
| <div class="block">Update the length of this range.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#setOffset(int)">setOffset</a></strong>(int offset)</code> |
| <div class="block">Update the beginning of this range.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#shallowCopy()">shallowCopy</a></strong>()</code> |
| <div class="block">Create a new <code>ByteRange</code> that points at this range's byte[].</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#shallowCopySubRange(int,%20int)">shallowCopySubRange</a></strong>(int innerOffset, |
| int copyLength)</code> |
| <div class="block">Create a new <code>ByteRange</code> that points at this range's byte[].</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#unset()">unset</a></strong>()</code> |
| <div class="block">Nullifies this ByteRange.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Comparable"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang">compareTo</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getBytes()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBytes</h4> |
| <pre>byte[] getBytes()</pre> |
| <div class="block">The underlying byte[].</div> |
| </li> |
| </ul> |
| <a name="unset()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unset</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> unset()</pre> |
| <div class="block">Nullifies this ByteRange. That is, it becomes a husk, being a range over |
| no byte[] whatsoever.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>this</dd></dl> |
| </li> |
| </ul> |
| <a name="set(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> set(int capacity)</pre> |
| <div class="block">Reuse this <code>ByteRange</code> over a new byte[]. <code>offset</code> is set to |
| 0 and <code>length</code> is set to <code>capacity</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>capacity</code> - the size of a new byte[].</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this</dd></dl> |
| </li> |
| </ul> |
| <a name="set(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> set(byte[] bytes)</pre> |
| <div class="block">Reuse this <code>ByteRange</code> over a new byte[]. <code>offset</code> is set to |
| 0 and <code>length</code> is set to <code>bytes.length</code>. A null <code>bytes</code> |
| IS supported, in which case this method will behave equivalently to |
| <a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#unset()"><code>unset()</code></a>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - the array to wrap.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this</dd></dl> |
| </li> |
| </ul> |
| <a name="set(byte[], int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> set(byte[] bytes, |
| int offset, |
| int length)</pre> |
| <div class="block">Reuse this <code>ByteRange</code> over a new byte[]. A null <code>bytes</code> IS |
| supported, in which case this method will behave equivalently to |
| <a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#unset()"><code>unset()</code></a>, regardless of the values of <code>offset</code> and |
| <code>length</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - The array to wrap.</dd><dd><code>offset</code> - The offset into <code>bytes</code> considered the beginning of |
| this range.</dd><dd><code>length</code> - The length of this range.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this.</dd></dl> |
| </li> |
| </ul> |
| <a name="getOffset()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getOffset</h4> |
| <pre>int getOffset()</pre> |
| <div class="block">The offset, the index into the underlying byte[] at which this range |
| begins.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html#getBytes()"><code>getBytes()</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="setOffset(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setOffset</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> setOffset(int offset)</pre> |
| <div class="block">Update the beginning of this range. <code>offset + length</code> may not be |
| greater than <code>bytes.length</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>offset</code> - the new start of this range.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this.</dd></dl> |
| </li> |
| </ul> |
| <a name="getLength()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLength</h4> |
| <pre>int getLength()</pre> |
| <div class="block">The length of the range.</div> |
| </li> |
| </ul> |
| <a name="setLength(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLength</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> setLength(int length)</pre> |
| <div class="block">Update the length of this range. <code>offset + length</code> should not be |
| greater than <code>bytes.length</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>length</code> - The new length of this range.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this.</dd></dl> |
| </li> |
| </ul> |
| <a name="isEmpty()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEmpty</h4> |
| <pre>boolean isEmpty()</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>true when this range is of zero length, false otherwise.</dd></dl> |
| </li> |
| </ul> |
| <a name="get(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre>byte get(int index)</pre> |
| <div class="block">Retrieve the byte at <code>index</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - zero-based index into this range.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>single byte at index.</dd></dl> |
| </li> |
| </ul> |
| <a name="getShort(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getShort</h4> |
| <pre>short getShort(int index)</pre> |
| <div class="block">Retrieve the short value at <code>index</code></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - zero-based index into this range</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the short value at <code>index</code></dd></dl> |
| </li> |
| </ul> |
| <a name="getInt(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInt</h4> |
| <pre>int getInt(int index)</pre> |
| <div class="block">Retrieve the int value at <code>index</code></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - zero-based index into this range</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the int value at <code>index</code></dd></dl> |
| </li> |
| </ul> |
| <a name="getLong(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLong</h4> |
| <pre>long getLong(int index)</pre> |
| <div class="block">Retrieve the long value at <code>index</code></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - zero-based index into this range</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the long value at <code>index</code></dd></dl> |
| </li> |
| </ul> |
| <a name="getVLong(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVLong</h4> |
| <pre>long getVLong(int index)</pre> |
| <div class="block">Retrieve the long value at <code>index</code> which is stored as VLong</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - zero-based index into this range</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the long value at <code>index</code> which is stored as VLong</dd></dl> |
| </li> |
| </ul> |
| <a name="get(int, byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> get(int index, |
| byte[] dst)</pre> |
| <div class="block">Fill <code>dst</code> with bytes from the range, starting from <code>index</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - zero-based index into this range.</dd><dd><code>dst</code> - the destination of the copy.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this.</dd></dl> |
| </li> |
| </ul> |
| <a name="get(int, byte[], int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> get(int index, |
| byte[] dst, |
| int offset, |
| int length)</pre> |
| <div class="block">Fill <code>dst</code> with bytes from the range, starting from <code>index</code>. |
| <code>length</code> bytes are copied into <code>dst</code>, starting at <code>offset</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - zero-based index into this range.</dd><dd><code>dst</code> - the destination of the copy.</dd><dd><code>offset</code> - the offset into <code>dst</code> to start the copy.</dd><dd><code>length</code> - the number of bytes to copy into <code>dst</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this.</dd></dl> |
| </li> |
| </ul> |
| <a name="put(int, byte)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>put</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> put(int index, |
| byte val)</pre> |
| <div class="block">Store <code>val</code> at <code>index</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - the index in the range where <code>val</code> is stored.</dd><dd><code>val</code> - the value to store.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this.</dd></dl> |
| </li> |
| </ul> |
| <a name="putShort(int, short)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putShort</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> putShort(int index, |
| short val)</pre> |
| <div class="block">Store the short value at <code>index</code></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - the index in the range where <code>val</code> is stored</dd><dd><code>val</code> - the value to store</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this</dd></dl> |
| </li> |
| </ul> |
| <a name="putInt(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putInt</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> putInt(int index, |
| int val)</pre> |
| <div class="block">Store the int value at <code>index</code></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - the index in the range where <code>val</code> is stored</dd><dd><code>val</code> - the value to store</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this</dd></dl> |
| </li> |
| </ul> |
| <a name="putLong(int, long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putLong</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> putLong(int index, |
| long val)</pre> |
| <div class="block">Store the long value at <code>index</code></div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - the index in the range where <code>val</code> is stored</dd><dd><code>val</code> - the value to store</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this</dd></dl> |
| </li> |
| </ul> |
| <a name="putVLong(int, long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putVLong</h4> |
| <pre>int putVLong(int index, |
| long val)</pre> |
| <div class="block">Store the long value at <code>index</code> as a VLong</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - the index in the range where <code>val</code> is stored</dd><dd><code>val</code> - the value to store</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>number of bytes written</dd></dl> |
| </li> |
| </ul> |
| <a name="put(int, byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>put</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> put(int index, |
| byte[] val)</pre> |
| <div class="block">Store <code>val</code> at <code>index</code>.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - the index in the range where <code>val</code> is stored.</dd><dd><code>val</code> - the value to store.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this.</dd></dl> |
| </li> |
| </ul> |
| <a name="put(int, byte[], int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>put</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> put(int index, |
| byte[] val, |
| int offset, |
| int length)</pre> |
| <div class="block">Store <code>length</code> bytes from <code>val</code> into this range, starting at |
| <code>index</code>. Bytes from <code>val</code> are copied starting at <code>offset</code> |
| into the range.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>index</code> - position in this range to start the copy.</dd><dd><code>val</code> - the value to store.</dd><dd><code>offset</code> - the offset in <code>val</code> from which to start copying.</dd><dd><code>length</code> - the number of bytes to copy from <code>val</code>.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>this.</dd></dl> |
| </li> |
| </ul> |
| <a name="deepCopyToNewArray()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deepCopyToNewArray</h4> |
| <pre>byte[] deepCopyToNewArray()</pre> |
| <div class="block">Instantiate a new byte[] with exact length, which is at least 24 bytes + |
| length. Copy the contents of this range into it.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>The newly cloned byte[].</dd></dl> |
| </li> |
| </ul> |
| <a name="deepCopy()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deepCopy</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> deepCopy()</pre> |
| <div class="block">Create a new <code>ByteRange</code> with new backing byte[] containing a copy |
| of the content from <code>this</code> range's window.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>Deep copy</dd></dl> |
| </li> |
| </ul> |
| <a name="deepCopyTo(byte[], int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deepCopyTo</h4> |
| <pre>void deepCopyTo(byte[] destination, |
| int destinationOffset)</pre> |
| <div class="block">Wrapper for System.arraycopy. Copy the contents of this range into the |
| provided array.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>destination</code> - Copy to this array</dd><dd><code>destinationOffset</code> - First index in the destination array.</dd></dl> |
| </li> |
| </ul> |
| <a name="deepCopySubRangeTo(int, int, byte[], int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deepCopySubRangeTo</h4> |
| <pre>void deepCopySubRangeTo(int innerOffset, |
| int copyLength, |
| byte[] destination, |
| int destinationOffset)</pre> |
| <div class="block">Wrapper for System.arraycopy. Copy the contents of this range into the |
| provided array.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>innerOffset</code> - Start copying from this index in this source |
| ByteRange. First byte copied is bytes[offset + innerOffset]</dd><dd><code>copyLength</code> - Copy this many bytes</dd><dd><code>destination</code> - Copy to this array</dd><dd><code>destinationOffset</code> - First index in the destination array.</dd></dl> |
| </li> |
| </ul> |
| <a name="shallowCopy()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>shallowCopy</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> shallowCopy()</pre> |
| <div class="block">Create a new <code>ByteRange</code> that points at this range's byte[]. |
| Modifying the shallowCopy will modify the bytes in this range's array. |
| Pass over the hash code if it is already cached.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>new <code>ByteRange</code> object referencing this range's byte[].</dd></dl> |
| </li> |
| </ul> |
| <a name="shallowCopySubRange(int, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>shallowCopySubRange</h4> |
| <pre><a href="../../../../../org/apache/hadoop/hbase/util/ByteRange.html" title="interface in org.apache.hadoop.hbase.util">ByteRange</a> shallowCopySubRange(int innerOffset, |
| int copyLength)</pre> |
| <div class="block">Create a new <code>ByteRange</code> that points at this range's byte[]. The new |
| range can have different values for offset and length, but modifying the |
| shallowCopy will modify the bytes in this range's array. Pass over the |
| hash code if it is already cached.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>innerOffset</code> - First byte of clone will be this.offset + copyOffset.</dd><dd><code>copyLength</code> - Number of bytes in the clone.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>new <code>ByteRange</code> object referencing this range's byte[].</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/ByteRange.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/ByteBufferUtils.html" title="class in org.apache.hadoop.hbase.util"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/hbase/util/ByteRangeUtils.html" title="class in org.apache.hadoop.hbase.util"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/hbase/util/ByteRange.html" target="_top">Frames</a></li> |
| <li><a href="ByteRange.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>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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–2019 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |