public class Util
extends java.lang.Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
getResourceOrFile(java.lang.String name)
Open a stream from a resource or a file.
|
static void |
getURL(java.lang.String url,
java.lang.String file)
Copy a URL to a local file
|
static java.lang.String |
replace(java.lang.String original,
java.lang.String match,
java.lang.String replace,
boolean all) |
static java.lang.String |
replacePrefix(java.lang.String value,
java.lang.String[] prefixes)
Replace one prefix string with another.
|
public static java.lang.String replace(java.lang.String original, java.lang.String match, java.lang.String replace, boolean all)
public static void getURL(java.lang.String url, java.lang.String file) throws java.lang.Exception
java.lang.Exception
public static java.io.InputStream getResourceOrFile(java.lang.String name) throws java.io.IOException
name
- The name of the resource or file.java.io.IOException
public static java.lang.String replacePrefix(java.lang.String value, java.lang.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.