Example usage for Java org.apache.hadoop.util StringUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
char | COMMA |
String | COMMA_STR |
char | ESCAPE_CHAR |
String | arrayToString(String[] strs) Given an array of strings, return a comma-separated list of its elements. |
String | byteDesc(long len) |
String | byteToHexString(byte bytes[]) Same as byteToHexString(bytes, 0, bytes.length). |
String | byteToHexString(byte b) Convert a byte to a hex string. |
String | byteToHexString(byte[] bytes, int start, int end) Given an array of bytes it will convert the bytes to a hex string representation of the bytes |
String | camelize(String s) Convert SOME_STUFF to SomeStuff |
boolean | equalsIgnoreCase(String s1, String s2) Compare strings locale-freely by using String#equalsIgnoreCase. |
String | escapeString(String str) Escape commas in the string using the default escape char |
String | escapeString(String str, char escapeChar, char charToEscape) Escape charToEscape in the string with the escape char escapeChar |
String | escapeString(String str, char escapeChar, char[] charsToEscape) |
int | findNext(String str, char separator, char escapeChar, int start, StringBuilder split) Finds the first occurrence of the separator character ignoring the escaped separators starting from the index. |
String | formatPercent(double fraction, int decimalPlaces) Format a percentage for presentation to the user. |
String | formatTime(long timeDiff) Given the time in long milliseconds, returns a String in the format Xhrs, Ymins, Z sec. |
String | formatTimeDiff(long finishTime, long startTime) Given a finish and start time in long milliseconds, returns a String in the format Xhrs, Ymins, Z sec, for the time difference between two times. |
Collection | getStringCollection(String str) Returns a collection of strings. |
Collection | getStringCollection(String str, String delim) Returns a collection of strings. |
String[] | getStrings(String str) Returns an arraylist of strings. |
Collection | getTrimmedStringCollection(String str) Splits a comma separated value String , trimming leading and trailing whitespace on each value. |
String[] | getTrimmedStrings(String str) Splits a comma or newline separated value String , trimming leading and trailing whitespace on each value. |
byte[] | hexStringToByte(String hex) Given a hexstring this will return the byte array corresponding to the string |
String | humanReadableInt(long number) Given an integer, return a string that is in an approximate, but human readable format. |
String | join(CharSequence separator, Iterable> strings) Concatenates strings, using a separator. |
String | join(char separator, Iterable> strings) |
String | join(CharSequence separator, String[] strings) Concatenates strings, using a separator. |
String | join(char separator, String[] strings) |
String | limitDecimalTo2(double d) |
String | simpleHostname(String fullHostname) Given a full hostname, return the word upto the first dot. |
String[] | split(String str, char separator) Split a string using the given separator, with no escaping performed. |
String[] | split(String str) Split a string using the default separator |
String[] | split(String str, char escapeChar, char separator) Split a string using the given separator |
void | startupShutdownMessage(Class> clazz, String[] args, final org.apache.commons.logging.Log LOG) Print a log message for starting up and shutting down |
void | startupShutdownMessage(Class> clazz, String[] args, final org.slf4j.Logger LOG) Print a log message for starting up and shutting down |
void | startupShutdownMessage(Class> clazz, String[] args, final LogAdapter LOG) |
String | stringifyException(Throwable e) Make a string representation of the exception. |
Path[] | stringToPath(String[] str) |
String | toLowerCase(String str) Converts all of the characters in this String to lower case with Locale.ENGLISH. |
String | unEscapeString(String str) Unescape commas in the string using the default escape char |
String | unEscapeString(String str, char escapeChar, char charToEscape) Unescape charToEscape in the string with the escape char escapeChar |
String | unEscapeString(String str, char escapeChar, char[] charsToEscape) |
String | uriToString(URI[] uris) |