Package io.servicetalk.http.api
Class CharSequences
- java.lang.Object
-
- io.servicetalk.http.api.CharSequences
-
@Deprecated public final class CharSequences extends java.lang.ObjectDeprecated.This class is deprecated and will be removed in a future release. For a replacement, seeCharSequences.Provides factory methods for creatingCharSequenceimplementations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleancontentEquals(java.lang.CharSequence a, java.lang.CharSequence b)Deprecated.Returnstrueif the content of bothCharSequence's are equals.static booleancontentEqualsIgnoreCase(java.lang.CharSequence a, java.lang.CharSequence b)Deprecated.Perform a case-insensitive comparison of twoCharSequences.static java.lang.CharSequenceemptyAsciiString()Deprecated.Get a reference to an unmodifiable emptyCharSequencewith the same properties asnewAsciiString(Buffer).static intindexOf(java.lang.CharSequence sequence, char c, int fromIndex)Deprecated.Find the index ofcwithinsequencestarting at indexfromIndex.static booleanisAsciiString(java.lang.CharSequence sequence)Deprecated.Check if the providedCharSequenceis an AsciiString, result of a call tonewAsciiString(String).static java.lang.CharSequencenewAsciiString(Buffer input)Deprecated.Create a newCharSequencefrom the specifiedinput, supporting only 8-bit ASCII characters, and with a case-insensitivehashCode.static java.lang.CharSequencenewAsciiString(java.lang.String input)Deprecated.Create a newCharSequencefrom the specifiedinput, supporting only 8-bit ASCII characters, and with a case-insensitivehashCode.static booleanregionMatches(java.lang.CharSequence cs, boolean ignoreCase, int csStart, java.lang.CharSequence string, int start, int length)Deprecated.This methods make regionMatches operation correctly for any chars in strings.static java.util.List<java.lang.CharSequence>split(java.lang.CharSequence input, char delimiter)Deprecated.Split a givenCharSequenceto separate ones on the givendelimiter.static BufferunwrapBuffer(java.lang.CharSequence cs)Deprecated.Attempt to unwrap aCharSequenceand obtain the underlyingBufferif possible.
-
-
-
Method Detail
-
newAsciiString
public static java.lang.CharSequence newAsciiString(java.lang.String input)
Deprecated.Create a newCharSequencefrom the specifiedinput, supporting only 8-bit ASCII characters, and with a case-insensitivehashCode.- Parameters:
input- a string containing only 8-bit ASCII characters.- Returns:
- a
CharSequence
-
newAsciiString
public static java.lang.CharSequence newAsciiString(Buffer input)
Deprecated.Create a newCharSequencefrom the specifiedinput, supporting only 8-bit ASCII characters, and with a case-insensitivehashCode.- Parameters:
input- aBuffercontaining- Returns:
- a
CharSequence.
-
emptyAsciiString
public static java.lang.CharSequence emptyAsciiString()
Deprecated.Get a reference to an unmodifiable emptyCharSequencewith the same properties asnewAsciiString(Buffer).- Returns:
- a reference to an unmodifiable empty
CharSequencewith the same properties asnewAsciiString(Buffer).
-
isAsciiString
public static boolean isAsciiString(java.lang.CharSequence sequence)
Deprecated.Check if the providedCharSequenceis an AsciiString, result of a call tonewAsciiString(String).- Parameters:
sequence- TheCharSequenceto check.- Returns:
trueif the check passes.
-
unwrapBuffer
@Nullable public static Buffer unwrapBuffer(java.lang.CharSequence cs)
Deprecated.Attempt to unwrap aCharSequenceand obtain the underlyingBufferif possible.- Parameters:
cs- theCharSequenceto unwrap.- Returns:
- the underlying
Bufferornull.
-
contentEqualsIgnoreCase
public static boolean contentEqualsIgnoreCase(@Nullable java.lang.CharSequence a, @Nullable java.lang.CharSequence b)Deprecated.Perform a case-insensitive comparison of twoCharSequences.NOTE: This only supports 8-bit ASCII.
- Parameters:
a- firstCharSequenceto compare.b- secondCharSequenceto compare.- Returns:
trueif bothCharSequence's are equals when ignoring the case.
-
contentEquals
public static boolean contentEquals(java.lang.CharSequence a, java.lang.CharSequence b)Deprecated.Returnstrueif the content of bothCharSequence's are equals. This only supports 8-bit ASCII.- Parameters:
a- left hand side of comparison.b- right hand side of comparison.- Returns:
trueifa's content equalsb.
-
indexOf
public static int indexOf(java.lang.CharSequence sequence, char c, int fromIndex)Deprecated.Find the index ofcwithinsequencestarting at indexfromIndex.- Parameters:
sequence- TheCharSequenceto search in.c- The character to find.fromIndex- The index to start searching (inclusive).- Returns:
- The index of
cor-1otherwise.
-
split
public static java.util.List<java.lang.CharSequence> split(java.lang.CharSequence input, char delimiter)Deprecated.Split a givenCharSequenceto separate ones on the givendelimiter. The returnedCharSequences are created by invoking theCharSequence.subSequence(int, int)method on the main one. This method has no support for regex.- Parameters:
input- The initialCharSequenceto split, this experiences no side effectsdelimiter- The delimiter character- Returns:
- a
ListofCharSequencesubsequences of the input with the separated values
-
regionMatches
public static boolean regionMatches(java.lang.CharSequence cs, boolean ignoreCase, int csStart, java.lang.CharSequence string, int start, int length)Deprecated.This methods make regionMatches operation correctly for any chars in strings.- Parameters:
cs- theCharSequenceto be processedignoreCase- specifies if case should be ignored.csStart- the starting offset in thecsCharSequencestring- theCharSequenceto compare.start- the starting offset in the specifiedstring.length- the number of characters to compare.- Returns:
trueif the ranges of characters are equal,falseotherwise.
-
-