HBASE-9401 add getQualifierBufferShallowCopy

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1522699 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
eclark 2013-09-12 19:26:32 +00:00
parent 07fd6b6a04
commit a7d7c86955
1 changed files with 6 additions and 1 deletions

View File

@ -117,7 +117,12 @@ public final class CellUtil {
public static ByteBuffer getValueBufferShallowCopy(Cell cell) { public static ByteBuffer getValueBufferShallowCopy(Cell cell) {
ByteBuffer buffer = ByteBuffer.wrap(cell.getValueArray(), cell.getValueOffset(), ByteBuffer buffer = ByteBuffer.wrap(cell.getValueArray(), cell.getValueOffset(),
cell.getValueLength()); cell.getValueLength());
// buffer.position(buffer.limit());//make it look as if value was appended return buffer;
}
public static ByteBuffer getQualifierBufferShallowCopy(Cell cell) {
ByteBuffer buffer = ByteBuffer.wrap(cell.getQualifierArray(), cell.getQualifierOffset(),
cell.getQualifierLength());
return buffer; return buffer;
} }