public class IOUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CHARSET_UTF_8 |
static String |
LINE_SEPARATOR |
| 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
|
static void |
zip(String sourceDirPath,
String zipFilePath) |
public static final String CHARSET_UTF_8
public static final String LINE_SEPARATOR
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()
public static void zip(String sourceDirPath, String zipFilePath) throws IOException
IOExceptionCopyright © 2019–2020 personify. All rights reserved.