public final class IndexableBinaryStringTools extends Object
ByteBuffer.slice()
.Modifier and Type | Method and Description |
---|---|
static void |
decode(char[] inputArray,
int inputOffset,
int inputLength,
byte[] outputArray,
int outputOffset,
int outputLength)
Decodes the input char sequence into the output byte sequence.
|
static ByteBuffer |
decode(CharBuffer input)
Deprecated.
Use
decode(char[], int, int, byte[], int, int)
instead. This method will be removed in Lucene 4.0 |
static void |
decode(CharBuffer input,
ByteBuffer output)
Deprecated.
Use
decode(char[], int, int, byte[], int, int)
instead. This method will be removed in Lucene 4.0 |
static void |
encode(byte[] inputArray,
int inputOffset,
int inputLength,
char[] outputArray,
int outputOffset,
int outputLength)
Encodes the input byte sequence into the output char sequence.
|
static CharBuffer |
encode(ByteBuffer input)
Deprecated.
Use
encode(byte[], int, int, char[], int, int)
instead. This method will be removed in Lucene 4.0 |
static void |
encode(ByteBuffer input,
CharBuffer output)
Deprecated.
Use
encode(byte[], int, int, char[], int, int)
instead. This method will be removed in Lucene 4.0 |
static int |
getDecodedLength(char[] encoded,
int offset,
int length)
Returns the number of bytes required to decode the given char sequence.
|
static int |
getDecodedLength(CharBuffer encoded)
Deprecated.
Use
getDecodedLength(char[], int, int) instead. This
method will be removed in Lucene 4.0 |
static int |
getEncodedLength(byte[] inputArray,
int inputOffset,
int inputLength)
Returns the number of chars required to encode the given bytes.
|
static int |
getEncodedLength(ByteBuffer original)
Deprecated.
Use
getEncodedLength(byte[], int, int) instead. This
method will be removed in Lucene 4.0 |
@Deprecated public static int getEncodedLength(ByteBuffer original) throws IllegalArgumentException
getEncodedLength(byte[], int, int)
instead. This
method will be removed in Lucene 4.0original
- The byte sequence to be encoded. Must be backed by an
array.IllegalArgumentException
- If the given ByteBuffer is not backed by
an arraypublic static int getEncodedLength(byte[] inputArray, int inputOffset, int inputLength)
inputArray
- byte sequence to be encodedinputOffset
- initial offset into inputArrayinputLength
- number of bytes in inputArray@Deprecated public static int getDecodedLength(CharBuffer encoded) throws IllegalArgumentException
getDecodedLength(char[], int, int)
instead. This
method will be removed in Lucene 4.0encoded
- The char sequence to be decoded. Must be backed by an array.IllegalArgumentException
- If the given CharBuffer is not backed by
an arraypublic static int getDecodedLength(char[] encoded, int offset, int length)
encoded
- char sequence to be decodedoffset
- initial offsetlength
- number of characters@Deprecated public static void encode(ByteBuffer input, CharBuffer output)
encode(byte[], int, int, char[], int, int)
instead. This method will be removed in Lucene 4.0getEncodedLength(java.nio.ByteBuffer)
.input
- The byte sequence to encodeoutput
- Where the char sequence encoding result will go. The limit is
set to one past the position of the final char.IllegalArgumentException
- If either the input or the output buffer
is not backed by an arraypublic static void encode(byte[] inputArray, int inputOffset, int inputLength, char[] outputArray, int outputOffset, int outputLength)
getEncodedLength(byte[], int, int)
.inputArray
- byte sequence to be encodedinputOffset
- initial offset into inputArrayinputLength
- number of bytes in inputArrayoutputArray
- char sequence to store encoded resultoutputOffset
- initial offset into outputArrayoutputLength
- length of output, must be getEncodedLength@Deprecated public static void decode(CharBuffer input, ByteBuffer output)
decode(char[], int, int, byte[], int, int)
instead. This method will be removed in Lucene 4.0getDecodedLength(java.nio.CharBuffer)
.input
- The char sequence to decodeoutput
- Where the byte sequence decoding result will go. The limit is
set to one past the position of the final char.IllegalArgumentException
- If either the input or the output buffer
is not backed by an arraypublic static void decode(char[] inputArray, int inputOffset, int inputLength, byte[] outputArray, int outputOffset, int outputLength)
getDecodedLength(char[], int, int)
.inputArray
- char sequence to be decodedinputOffset
- initial offset into inputArrayinputLength
- number of chars in inputArrayoutputArray
- byte sequence to store encoded resultoutputOffset
- initial offset into outputArrayoutputLength
- length of output, must be
getDecodedLength(inputArray, inputOffset, inputLength)@Deprecated public static ByteBuffer decode(CharBuffer input)
decode(char[], int, int, byte[], int, int)
instead. This method will be removed in Lucene 4.0encode(java.nio.ByteBuffer)
or
encode(java.nio.ByteBuffer, java.nio.CharBuffer)
.input
- The char sequence to decodeIllegalArgumentException
- If the input buffer is not backed by an
array@Deprecated public static CharBuffer encode(ByteBuffer input)
encode(byte[], int, int, char[], int, int)
instead. This method will be removed in Lucene 4.0input
- The byte sequence to encodeIllegalArgumentException
- If the input buffer is not backed by an
array