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, waitcompareTo, writechars, codePointsprotected 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 Utf8CharSequencepublic String getStringOrNull()
public int write(int start,
byte[] buffer,
int pos)
Utf8CharSequencewrite in interface Utf8CharSequencestart - position from which to start writingbuffer - the buffer to which to write topos - position to start writingpublic int size()
Utf8CharSequencesize in interface Utf8CharSequencepublic int length()
length in interface CharSequencepublic static boolean utf8Equals(Utf8CharSequence utf8_1, Utf8CharSequence utf8_2)
public char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic ByteArrayUtf8CharSequence clone()
clone in interface Utf8CharSequenceclone in class Objectpublic ByteArrayUtf8CharSequence deepCopy()
public static Collection convertCharSeq(Collection vals)
public String toString()
toString in interface CharSequencetoString in class Objectpublic 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-2021 Apache Software Foundation. All Rights Reserved.