@InterfaceAudience.Public public class SimpleMutableByteRange extends AbstractByteRange
ByteRange implementation.bytes, hash, length, offset, UNSET_HASH_VALUE| Constructor and Description | 
|---|
| SimpleMutableByteRange()Create a new  ByteRangelacking a backing array and with an
 undefined viewport. | 
| SimpleMutableByteRange(byte[] bytes)Create a new  ByteRangeover the providedbytes. | 
| SimpleMutableByteRange(byte[] bytes,
                      int offset,
                      int length)Create a new  ByteRangeover the providedbytes. | 
| SimpleMutableByteRange(int capacity)Create a new  ByteRangeover a new backing array of sizecapacity. | 
| Modifier and Type | Method and Description | 
|---|---|
| ByteRange | deepCopy()Create a new  ByteRangewith new backing byte[] containing a copy
 of the content fromthisrange's window. | 
| boolean | equals(Object thatObject) | 
| ByteRange | put(int index,
   byte val)Store  valatindex. | 
| ByteRange | put(int index,
   byte[] val)Store  valatindex. | 
| ByteRange | put(int index,
   byte[] val,
   int offset,
   int length)Store  lengthbytes fromvalinto this range, starting atindex. | 
| ByteRange | putInt(int index,
      int val)Store the int value at  index | 
| ByteRange | putLong(int index,
       long val)Store the long value at  index | 
| ByteRange | putShort(int index,
        short val)Store the short value at  index | 
| int | putVLong(int index,
        long val)Store the long value at  indexas a VLong | 
| ByteRange | shallowCopy()Create a new  ByteRangethat points at this range's byte[]. | 
| ByteRange | shallowCopySubRange(int innerOffset,
                   int copyLength)Create a new  ByteRangethat points at this range's byte[]. | 
| ByteRange | unset()Nullifies this ByteRange. | 
clearHashCache, compareTo, deepCopySubRangeTo, deepCopyTo, deepCopyToNewArray, get, get, get, getBytes, getInt, getLength, getLong, getOffset, getShort, getVLong, getVLongSize, hashCode, isEmpty, isEmpty, isHashCached, set, set, set, setLength, setOffset, toStringpublic SimpleMutableByteRange()
ByteRange lacking a backing array and with an
 undefined viewport.public SimpleMutableByteRange(int capacity)
ByteRange over a new backing array of size
 capacity. The range's offset and length are 0 and capacity,
 respectively.capacity - the size of the backing array.public SimpleMutableByteRange(byte[] bytes)
ByteRange over the provided bytes.bytes - The array to wrap.public SimpleMutableByteRange(byte[] bytes, int offset, int length)
ByteRange over the provided bytes.bytes - The array to wrap.offset - The offset into bytes considered the beginning of this
          range.length - The length of this range.public ByteRange unset()
ByteRangepublic ByteRange put(int index, byte val)
ByteRangeval at index.index - the index in the range where val is stored.val - the value to store.public ByteRange put(int index, byte[] val)
ByteRangeval at index.index - the index in the range where val is stored.val - the value to store.public ByteRange put(int index, byte[] val, int offset, int length)
ByteRangelength bytes from val into this range, starting at
 index. Bytes from val are copied starting at offset
 into the range.index - position in this range to start the copy.val - the value to store.offset - the offset in val from which to start copying.length - the number of bytes to copy from val.public ByteRange putShort(int index, short val)
ByteRangeindexindex - the index in the range where val is storedval - the value to storepublic ByteRange putInt(int index, int val)
ByteRangeindexindex - the index in the range where val is storedval - the value to storepublic ByteRange putLong(int index, long val)
ByteRangeindexindex - the index in the range where val is storedval - the value to storepublic int putVLong(int index, long val)
ByteRangeindex as a VLongindex - the index in the range where val is storedval - the value to storepublic ByteRange deepCopy()
ByteRangeByteRange with new backing byte[] containing a copy
 of the content from this range's window.public ByteRange shallowCopy()
ByteRangeByteRange 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.ByteRange object referencing this range's byte[].public ByteRange shallowCopySubRange(int innerOffset, int copyLength)
ByteRangeByteRange 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.innerOffset - First byte of clone will be this.offset + copyOffset.copyLength - Number of bytes in the clone.ByteRange object referencing this range's byte[].public boolean equals(Object thatObject)
equals in class AbstractByteRangeCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.