getFirstLine(String text) The first line of text (all characters up to the first occurence of
either "\n" or "\r".
Parameters: text - The text where the first line is looked up.
safeString(Object object) Create a string representation of object that is
guaranteed not to fail in any case.
Parameters: object - The object to be printed.
The first line of text (all characters up to the first occurence of
either "\n" or "\r".
Parameters: text - The text where the first line is looked up. The first line of text
The number of lines in text. This is 1 + the number of
"\n" in text.
Parameters: text - The text where the lines are counted. The number of lines in text. This is 1 + thenumber of "\n" in text.
This is the case when value == null, value has no characters or only
whitespace.
Parameters: value - The value to be inspected for emptyness. true if value is "empty" in anyrespect.
Create a string representation of object that is
guaranteed not to fail in any case.
Parameters: object - The object to be printed. Create a string representation of object that isguaranteed not to fail in any case.
toByteArray
public static byte[] toByteArray(String value)(Code)
Create a byte array from the string. This is simply a fast version of
getBytes, ignoring any encoding.
If you use this, you should be sure you will encounter valid ascii
characters only!
Parameters: value -
Create a string containing only the alphanumeric content of
value.
Parameters: value - The string to be trimmed. A string containing only the alphanumeric content ofvalue.
Create a new string from value without leading whitespace.
Parameters: value - The string to be stripped. A copy of value with leading whitespace stripped.
Create a new string from value without trailing
whitespace.
Parameters: value - The string to be stripped. A copy of value with trailing whitespace stripped.