public class BytesRefWritable extends java.lang.Object implements java.lang.Comparable<BytesRefWritable>
| Modifier and Type | Field and Description |
|---|---|
static BytesRefWritable |
ZeroBytesRefWritable |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BytesRefWritable other) |
boolean |
equals(java.lang.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(java.io.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.
|
java.lang.String |
toString() |
void |
write(java.io.DataOutput out) |
void |
writeDataTo(java.io.DataOutput out) |
public static BytesRefWritable ZeroBytesRefWritable
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)
public byte[] getBytesCopy()
throws java.io.IOException
java.io.IOExceptionpublic byte[] getData()
throws java.io.IOException
java.io.IOExceptionpublic void set(byte[] newData,
int offset,
int len)
readFields(DataInput)public void set(LazyDecompressionCallback newData, int offset, int len)
readFields(DataInput)public void writeDataTo(java.io.DataOutput out)
throws java.io.IOException
java.io.IOExceptionpublic void readFields(java.io.DataInput in)
throws java.io.IOException
java.io.IOExceptionset(byte[], int, int)public void write(java.io.DataOutput out)
throws java.io.IOException
java.io.IOExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(BytesRefWritable other)
compareTo in interface java.lang.Comparable<BytesRefWritable>public boolean equals(java.lang.Object right_obj)
equals in class java.lang.Objectpublic int getLength()
public int getStart()
Copyright © 2012 The Apache Software Foundation