public class ByteArrayUtf8CharSequence extends Object implements Utf8CharSequence
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buf |
protected int |
hashCode |
protected int |
length |
protected int |
offset |
Function<ByteArrayUtf8CharSequence,String> |
stringProvider |
protected String |
utf16 |
Constructor and Description |
---|
ByteArrayUtf8CharSequence(byte[] buf,
int offset,
int length) |
ByteArrayUtf8CharSequence(String utf16) |
Modifier and Type | Method and Description |
---|---|
static boolean |
_equals(byte[] a,
int aFromIndex,
int aToIndex,
byte[] b,
int bFromIndex,
int bToIndex)
Behaves like Java 9's Arrays.equals
|
byte |
byteAt(int idx) |
char |
charAt(int index) |
ByteArrayUtf8CharSequence |
clone() |
static Collection |
convertCharSeq(Collection vals) |
static Map.Entry |
convertCharSeq(Map.Entry e) |
static Object |
convertCharSeq(Object o) |
ByteArrayUtf8CharSequence |
deepCopy() |
boolean |
equals(Object other) |
byte[] |
getBuf() |
String |
getStringOrNull()
this is for internal use to get a cached string value.
|
int |
hashCode() |
boolean |
isValid()
Performs internal consistency checks.
|
int |
length() |
int |
offset() |
ByteArrayUtf8CharSequence |
reset(byte[] bytes,
int offset,
int length,
String str) |
int |
size()
The size of utf8 bytes
|
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
static boolean |
utf8Equals(Utf8CharSequence utf8_1,
Utf8CharSequence utf8_2) |
int |
write(int start,
byte[] buffer,
int pos)
Write the bytes into a buffer.
|
finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, write
chars, codePoints
protected byte[] buf
protected int offset
protected int hashCode
protected int length
protected volatile String utf16
public Function<ByteArrayUtf8CharSequence,String> stringProvider
public ByteArrayUtf8CharSequence(String utf16)
public ByteArrayUtf8CharSequence(byte[] buf, int offset, int length)
public byte[] getBuf()
public int offset()
public byte byteAt(int idx)
byteAt
in interface Utf8CharSequence
public String getStringOrNull()
public int write(int start, byte[] buffer, int pos)
Utf8CharSequence
write
in interface Utf8CharSequence
start
- position from which to start writingbuffer
- the buffer to which to write topos
- position to start writingpublic int size()
Utf8CharSequence
size
in interface Utf8CharSequence
public int length()
length
in interface CharSequence
public static boolean utf8Equals(Utf8CharSequence utf8_1, Utf8CharSequence utf8_2)
public char charAt(int index)
charAt
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public ByteArrayUtf8CharSequence clone()
clone
in interface Utf8CharSequence
clone
in class Object
public ByteArrayUtf8CharSequence deepCopy()
public static Collection convertCharSeq(Collection vals)
public String toString()
toString
in interface CharSequence
toString
in class Object
public static boolean _equals(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)
public ByteArrayUtf8CharSequence reset(byte[] bytes, int offset, int length, String str)
public boolean isValid()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.