public class FileHelper extends Object
| Constructor and Description |
|---|
FileHelper() |
| Modifier and Type | Method and Description |
|---|---|
static File |
find(File parent,
String name)
Find file in the parent directory provided.
|
static byte[] |
load(InputStream in)
Load InputStream to byte [ ].
|
static byte[] |
load(String file)
Load byte [ ].
|
static void |
save(String path,
String contents)
Save a file with String content in the path provided
|
public static byte[] load(String file) throws IOException
file - the fileIOException - the io exceptionpublic static File find(File parent, String name) throws IOException
parent - the parentname - the nameIOException - the io exceptionpublic static void save(String path, String contents) throws IOException
path - the pathcontents - the contentsIOException - the io exceptionpublic static byte[] load(InputStream in) throws IOException
in - the inIOException - the io exceptionCopyright © 2016–2020. All rights reserved.