public class ByteBufWritableComparable extends java.lang.Object implements org.apache.hadoop.io.WritableComparable<ByteBufWritableComparable>
| Modifier and Type | Field and Description |
|---|---|
static ByteBufWritableComparable |
EMPTY_BYTEBUFFER |
| Constructor and Description |
|---|
ByteBufWritableComparable() |
ByteBufWritableComparable(java.nio.ByteBuffer buff) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ByteBufWritableComparable o)
compares current object with another object of type ByteBufWritableComparable.
|
boolean |
equals(java.lang.Object b)
Compares current object with
b. |
java.nio.ByteBuffer |
getByteBuf() |
byte[] |
getBytes() |
int |
getLength() |
void |
readFields(java.io.DataInput in)
Deserialize the fields of this object from input stream
in. |
void |
setByteBuf(java.nio.ByteBuffer b) |
java.lang.String |
toString()
Returns the string version of current object.
|
void |
write(java.io.DataOutput out)
Write serialized object to output stream
out. |
public static ByteBufWritableComparable EMPTY_BYTEBUFFER
public ByteBufWritableComparable()
public ByteBufWritableComparable(java.nio.ByteBuffer buff)
public int getLength()
public byte[] getBytes()
public java.nio.ByteBuffer getByteBuf()
public void setByteBuf(java.nio.ByteBuffer b)
public void readFields(java.io.DataInput in)
throws java.io.IOException
in.readFields in interface org.apache.hadoop.io.Writablein - Input stream which contains serialized object.java.io.IOExceptionWritable.readFields(java.io.DataInput)public void write(java.io.DataOutput out)
throws java.io.IOException
out.write in interface org.apache.hadoop.io.Writableout - Outputstream where serialized object is to be written.java.io.IOExceptionpublic boolean equals(java.lang.Object b)
b.equals in class java.lang.Objectb - Object to be compared with.Object.equals(java.lang.Object)public int compareTo(ByteBufWritableComparable o)
compareTo in interface java.lang.Comparable<ByteBufWritableComparable>o - the object to be compared with current object.public java.lang.String toString()
toString in class java.lang.Object