public class BytesArrayWritable
extends org.apache.hadoop.io.ArrayWritable
Constructor and Description |
---|
BytesArrayWritable() |
BytesArrayWritable(byte[][] elements)
Constructor for use when underlying array will be BytesWritable representations of byte[]
|
BytesArrayWritable(java.util.List<java.math.BigInteger> elements)
Constructor for use when underlying array will be ByteWritable representations of BigInteger objects
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.io.BytesWritable |
get(int i)
Return the ith element as a BytesWritable
|
java.math.BigInteger |
getBigInteger(int i)
Return the ith element from the underlying array
|
int |
getByteAsInt(int i)
Return the ith element as an int
|
byte[] |
getBytes(int i)
Return the ith element as a byte array
|
int |
size()
Returns the number of elements in the underlying array
|
public BytesArrayWritable()
public BytesArrayWritable(byte[][] elements)
public BytesArrayWritable(java.util.List<java.math.BigInteger> elements)
public int size()
public java.math.BigInteger getBigInteger(int i) throws java.io.IOException
Assumes that the underlying array consists of BytesWritable representations of BigInteger objects
Assumes that the underlying BigIntegers are unsigned, but have been stripped of zero padding (and hence the sign bit) -- must add it back in
java.io.IOException
public org.apache.hadoop.io.BytesWritable get(int i)
public byte[] getBytes(int i)
public int getByteAsInt(int i)