public final class Utility extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NEWLINE
System specific line separator character.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
commonPrefix(String string1,
String string2) |
static boolean |
containsWhitespace(String text)
Checks if the text contains whitespace.
|
static String |
convertForComparison(String text) |
static void |
copyFile(File sourceFile,
File destFile) |
static boolean |
isBlank(String text)
Checks if the text is null or empty.
|
static String |
pastelColorHTMLValue(String text) |
static String |
readFully(InputStream stream) |
static String |
readFully(Reader reader)
Reads the stream fully, and returns a byte array of data.
|
static String |
readResourceFully(String resource) |
static void |
setApplicationLogLevel(Level logLevel)
Sets the application-wide log level.
|
public static final String NEWLINE
public static boolean containsWhitespace(String text)
text - Text to check.public static void copyFile(File sourceFile, File destFile) throws IOException
IOExceptionpublic static boolean isBlank(String text)
text - Text to check.public static String readFully(InputStream stream)
public static String readFully(Reader reader)
reader - Reader to read.public static void setApplicationLogLevel(Level logLevel)
logLevel - Log level to setCopyright © 2003-2013 Sualeh Fatehi. All Rights Reserved.