Example usage for Java org.apache.lucene.util BytesRef fields, constructors, methods, implement or subclass
The text is from its open source code.
null | EMPTY_BYTES An empty byte array for convenience |
int | length Length of used bytes. |
BytesRef(byte[] bytes) This instance will directly reference bytes w/o making a copy. | |
BytesRef(int capacity) Create a BytesRef pointing to a new array of size capacity . | |
BytesRef(CharSequence text) Initialize the byte[] from the UTF8 bytes for the provided String. | |
BytesRef() Create a BytesRef with #EMPTY_BYTES | |
BytesRef(byte[] bytes, int offset, int length) This instance will directly reference bytes w/o making a copy. |
boolean | bytesEquals(BytesRef other) Expert: compares the bytes against another BytesRef, returning true if the bytes are equal. |
BytesRef | clone() Returns a shallow clone of this instance (the underlying bytes are not copied and will be shared by both the returned object and this object. |
int | compareTo(BytesRef other) Unsigned byte order comparison |
BytesRef | deepCopyOf(BytesRef other) Creates a new BytesRef that points to a copy of the bytes from other The returned BytesRef will have a length of other.length and an offset of zero. |
boolean | equals(Object other) |
int | hashCode() Calculates the hash code as required by TermsHash during indexing. |
String | toString() Returns hex encoded bytes, eg [0x6c 0x75 0x63 0x65 0x6e 0x65] |
String | utf8ToString() Interprets stored bytes as UTF8 bytes, returning the resulting string |