com.google.cloud.bigtable.hbase.util
Class ByteStringer
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.util.ByteStringer
-
public class ByteStringer extends Object
Wrapper aroundZeroCopyByteStringUtil
for cases where it's not available.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static byte[]
extract(ByteString buf)
static ByteString
wrap(byte[] array)
Wraps a byte array in aByteString
without copying it.static ByteString
wrap(byte[] array, int offset, int length)
Wraps a byte array in aByteString
without copying it.
-
-
-
Method Detail
-
wrap
public static ByteString wrap(byte[] array)
Wraps a byte array in aByteString
without copying it.- Parameters:
array
- an array object.- Returns:
ByteString
based on runtime copy flag.
-
wrap
public static ByteString wrap(byte[] array, int offset, int length)
Wraps a byte array in aByteString
without copying it.- Parameters:
array
- an array value.offset
- an integer value.length
- an integer value.- Returns:
- a
ByteString
object with array based on offset and length value.
-
extract
public static byte[] extract(ByteString buf)
-
-