public final class StringUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
HTML_PATTERN |
static List<String> |
RULES |
static Pattern |
UNPRINTABLE_PATTERN |
Modifier and Type | Method and Description |
---|---|
static void |
checkSanityString(String... strings)
Check external argument
|
static byte[] |
getBytesFromArraysToString(String bytesString)
Revert Arrays.toString for bytes
|
static String |
getClassName(Object object) |
static byte[] |
getRandom(int length) |
static String |
getStringFromInputStream(InputStream is)
Get text content of an input stream
|
static String |
substringBeforeLast(String source,
String separator)
Gets the substring before the last occurrence of a separator.
|
static String |
substringBetween(String source,
String start,
String end)
Gets the String that is nested in between two Strings.
|
public static final Pattern HTML_PATTERN
public static final Pattern UNPRINTABLE_PATTERN
public static void checkSanityString(String... strings) throws InvalidParseOperationException
strings
- InvalidParseOperationException
public static final byte[] getRandom(int length)
length
- the length of rraypublic static final byte[] getBytesFromArraysToString(String bytesString)
bytesString
- the string to transformIllegalArgumentException
- if bytesString is null or emptypublic static final String getClassName(Object object)
object
- to get its class namepublic static final String substringBetween(String source, String start, String end)
source
- start
- end
- public static final String substringBeforeLast(String source, String separator)
source
- separator
- public static String getStringFromInputStream(InputStream is) throws IOException
is
- input streamIOException
- when input stream unreadableCopyright © 2018 Vitam. All rights reserved.