@PublicAPI public class FileToBytesConverter extends Object
Constructor and Description |
---|
FileToBytesConverter() |
Modifier and Type | Method and Description |
---|---|
static void |
convertByteArrayToFile(byte[] array,
File file)
write contents of a byte array in a file
|
static byte[] |
convertFileToByteArray(File file)
Read contents of a file and return it as a byte array
|
public static byte[] convertFileToByteArray(File file) throws IOException
file
- the file to readIOException
public static void convertByteArrayToFile(byte[] array, File file) throws IOException
array
- Array of bytes to writefile
- object in which bytes will be writtenIOException