public class Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
getResourceOrFile(String name)
Open a stream from a resource or a file.
|
static void |
getURL(String url,
String file)
Copy a URL to a local file
|
static String |
replace(String original,
String match,
String replace,
boolean all) |
static String |
replacePrefix(String value,
String[] prefixes)
Replace one prefix string with another.
|
public static void getURL(String url, String file) throws Exception
Exceptionpublic static InputStream getResourceOrFile(String name) throws IOException
name - The name of the resource or file.IOExceptionpublic static String replacePrefix(String value, String[] prefixes)
value - The string to be modifed.prefixes - A 2 element array where we will look for the first prefix
at the beginning of value and if found replace it with the second prefix.