public class Util
extends java.lang.Object
Generic collection of utility methods.
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static void |
copy(java.io.InputStream in,
java.io.OutputStream out) |
static java.io.File |
file(java.io.File f,
java.lang.String... pathParts) |
static java.io.File |
file(java.lang.String... pathParts) |
static java.util.List<java.lang.Integer> |
intArrayToList(int[] ints) |
static int |
parseInt(java.lang.String valueFor) |
static byte[] |
readBytes(java.io.InputStream is)
This method consumes an input stream and returns its content.
|
static <T> T[] |
reverse(T[] array) |
static java.net.URL |
url(java.lang.String path) |
public static void copy(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static byte[] readBytes(java.io.InputStream is) throws java.io.IOException
This method consumes an input stream and returns its content.
is
- The input stream to read from.java.io.IOException
- Error reading from stream.public static <T> T[] reverse(T[] array)
public static java.io.File file(java.lang.String... pathParts)
public static java.io.File file(java.io.File f, java.lang.String... pathParts)
public static java.net.URL url(java.lang.String path) throws java.net.MalformedURLException
java.net.MalformedURLException
public static java.util.List<java.lang.Integer> intArrayToList(int[] ints)
public static int parseInt(java.lang.String valueFor)