public class IOUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CHARSET_UTF_8 |
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Charset |
defaultCharset()
Returns the default charset
|
static String |
getIp()
Returns the name/ip
|
static byte[] |
readFileAsBytes(Class<?> c,
String fileName)
Reads a file as bytes
|
static byte[] |
readFileAsBytes(InputStream inputStream)
Read a Inputstream
|
public static final String CHARSET_UTF_8
public static byte[] readFileAsBytes(InputStream inputStream) throws IOException
inputStream - containign the things to readIOException - containing the stacktracepublic static final Charset defaultCharset()
public static byte[] readFileAsBytes(Class<?> c, String fileName) throws IOException
c - the class for the getresourceasstreamfileName - the name of the fileIOException - containing the stacktracepublic static String getIp()
Copyright © 2019 personify. All rights reserved.