public final class Strings
extends java.lang.Object
Constructor and Description |
---|
Strings() |
Modifier and Type | Method and Description |
---|---|
static char[] |
asCharArray(byte[] bytes)
Do a simple conversion of an array of 8 bit characters into a string.
|
static boolean |
constantTimeAreEqual(java.lang.String a,
java.lang.String b)
Constant time string comparison.
|
static java.lang.String |
fromByteArray(byte[] bytes)
Convert an array of 8 bit characters into a string.
|
static java.lang.String |
fromUTF8ByteArray(byte[] bytes) |
static java.lang.String |
lineSeparator() |
static StringList |
newList() |
static java.lang.String[] |
split(java.lang.String input,
char delimiter) |
static byte[] |
toByteArray(char[] chars) |
static byte[] |
toByteArray(java.lang.String string) |
static int |
toByteArray(java.lang.String s,
byte[] buf,
int off) |
static java.lang.String |
toLowerCase(java.lang.String string)
A locale independent version of toLowerCase.
|
static java.lang.String |
toUpperCase(java.lang.String string)
A locale independent version of toUpperCase.
|
static byte[] |
toUTF8ByteArray(char[] string) |
static void |
toUTF8ByteArray(char[] string,
java.io.OutputStream sOut) |
static byte[] |
toUTF8ByteArray(java.lang.String string) |
public static java.lang.String fromUTF8ByteArray(byte[] bytes)
public static byte[] toUTF8ByteArray(java.lang.String string)
public static byte[] toUTF8ByteArray(char[] string)
public static void toUTF8ByteArray(char[] string, java.io.OutputStream sOut) throws java.io.IOException
java.io.IOException
public static java.lang.String toUpperCase(java.lang.String string)
string
- input to be convertedpublic static java.lang.String toLowerCase(java.lang.String string)
string
- input to be convertedpublic static byte[] toByteArray(char[] chars)
public static byte[] toByteArray(java.lang.String string)
public static int toByteArray(java.lang.String s, byte[] buf, int off)
public static boolean constantTimeAreEqual(java.lang.String a, java.lang.String b)
a
- a string.b
- another string to compare to a.public static java.lang.String fromByteArray(byte[] bytes)
bytes
- 8 bit characters.public static char[] asCharArray(byte[] bytes)
bytes
- 8 bit characters.public static java.lang.String[] split(java.lang.String input, char delimiter)
public static StringList newList()
public static java.lang.String lineSeparator()