Class AppendableCharSequence
java.lang.Object
io.netty.util.internal.AppendableCharSequence
- All Implemented Interfaces:
Appendable, CharSequence
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) append(CharSequence csq) append(CharSequence csq, int start, int end) charcharAt(int index) charcharAtUnsafe(int index) Access a value in thisCharSequence.intlength()voidreset()Reset theAppendableCharSequence.voidsetLength(int length) subSequence(int start, int end) substring(int start, int end) Create a newStringfrom the given start to end.subStringUnsafe(int start, int end) Create a newStringfrom the given start to end.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CharSequence
chars, codePoints
-
Constructor Details
-
AppendableCharSequence
public AppendableCharSequence(int length)
-
-
Method Details
-
setLength
public void setLength(int length) -
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
charAtUnsafe
public char charAtUnsafe(int index) Access a value in thisCharSequence. This method is considered unsafe as index values are assumed to be legitimate. Only underlying array bounds checking is done.- Parameters:
index- The index to access the underlying array at.- Returns:
- The value at
index.
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
append
- Specified by:
appendin interfaceAppendable
-
append
- Specified by:
appendin interfaceAppendable
-
append
- Specified by:
appendin interfaceAppendable
-
reset
public void reset()Reset theAppendableCharSequence. Be aware this will only reset the current internal position and not shrink the internal char array. -
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
substring
-
subStringUnsafe
-