/** * @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()); }
/** ****************** 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(); }
/** ***************** ByteRange ****************************** */ public static ByteRange fillRowRange(Cell cell, ByteRange range) { return range.set(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()); }
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); }
/** ******************* 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()); }