Beispiel #1
0
 /**
  * @param left
  * @param right
  * @return True if the rows in <code>left</code> and <code>right</code> Cells match
  */
 public static boolean matchingRow(final Cell left, final Cell right) {
   return Bytes.equals(
       left.getRowArray(),
       left.getRowOffset(),
       left.getRowLength(),
       right.getRowArray(),
       right.getRowOffset(),
       right.getRowLength());
 }
Beispiel #2
0
 /** ****************** copyTo ********************************* */
 public static int copyRowTo(Cell cell, byte[] destination, int destinationOffset) {
   System.arraycopy(
       cell.getRowArray(),
       cell.getRowOffset(),
       destination,
       destinationOffset,
       cell.getRowLength());
   return destinationOffset + cell.getRowLength();
 }
Beispiel #3
0
 /** ***************** ByteRange ****************************** */
 public static ByteRange fillRowRange(Cell cell, ByteRange range) {
   return range.set(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength());
 }
Beispiel #4
0
 public static boolean matchingRow(
     final Cell left, final byte[] buf, final int offset, final int length) {
   return Bytes.equals(
       left.getRowArray(), left.getRowOffset(), left.getRowLength(), buf, offset, length);
 }
Beispiel #5
0
 /** ******************* misc ************************************ */
 public static byte getRowByte(Cell cell, int index) {
   return cell.getRowArray()[cell.getRowOffset() + index];
 }
 public static void assertKey(final byte[] expected, final Cell c) {
   assertKey(expected, c.getRowArray(), c.getRowOffset(), c.getRowLength());
 }