|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.columnar.BytesRefWritable
public class BytesRefWritable
BytesRefWritable referenced a section of byte array. It can be used to avoid unnecessary byte copy.
Field Summary | |
---|---|
static BytesRefWritable |
ZeroBytesRefWritable
|
Constructor Summary | |
---|---|
BytesRefWritable()
Create a zero-size bytes. |
|
BytesRefWritable(byte[] bytes)
Create a BytesRefWritable referenced to the given bytes. |
|
BytesRefWritable(byte[] data,
int offset,
int len)
Create a BytesRefWritable referenced to one section of the given bytes. |
|
BytesRefWritable(int length)
Create a BytesRefWritable with length bytes. |
|
BytesRefWritable(LazyDecompressionCallback lazyDecompressData,
int offset,
int len)
Create a BytesRefWritable referenced to one section of the given bytes. |
Method Summary | |
---|---|
int |
compareTo(BytesRefWritable other)
|
boolean |
equals(Object right_obj)
|
byte[] |
getBytesCopy()
Returns a copy of the underlying bytes referenced by this instance. |
byte[] |
getData()
Returns the underlying bytes. |
int |
getLength()
|
int |
getStart()
|
int |
hashCode()
|
void |
readFields(DataInput in)
Always reuse the bytes array if length of bytes array is equal or greater to the current record, otherwise create a new one. |
void |
set(byte[] newData,
int offset,
int len)
readFields() will corrupt the array. |
void |
set(LazyDecompressionCallback newData,
int offset,
int len)
readFields() will corrupt the array. |
String |
toString()
|
void |
write(DataOutput out)
|
void |
writeDataTo(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static BytesRefWritable ZeroBytesRefWritable
Constructor Detail |
---|
public BytesRefWritable()
public BytesRefWritable(int length)
public BytesRefWritable(byte[] bytes)
public BytesRefWritable(byte[] data, int offset, int len)
public BytesRefWritable(LazyDecompressionCallback lazyDecompressData, int offset, int len)
Method Detail |
---|
public byte[] getBytesCopy() throws IOException
IOException
public byte[] getData() throws IOException
IOException
public void set(byte[] newData, int offset, int len)
readFields(DataInput)
public void set(LazyDecompressionCallback newData, int offset, int len)
readFields(DataInput)
public void writeDataTo(DataOutput out) throws IOException
IOException
public void readFields(DataInput in) throws IOException
IOException
set(byte[], int, int)
public void write(DataOutput out) throws IOException
IOException
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public int compareTo(BytesRefWritable other)
compareTo
in interface Comparable<BytesRefWritable>
public boolean equals(Object right_obj)
equals
in class Object
public int getLength()
public int getStart()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |