public final class FileUtilities
extends java.lang.Object
FileUtilities contain utility routine for I/O operations.| Constructor and Description |
|---|
FileUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
readFile(java.net.URL url)
Reads the contents of the URL completely into memory, returning the contents as a byte array.
|
static void |
writeFile(java.net.URL url, byte[] data)
Writes the specified contents to the URL location.
|
static void |
writeFile(java.net.URL url, byte[] data, int offset, int count)
Writes the specified contents to the URL location.
|
public static byte[] readFile(java.net.URL url)
throws java.io.IOException
url - the url to read injava.io.IOException - if the url cannot be read
public static void writeFile(java.net.URL url,
byte[] data)
throws java.io.IOException
url - the url to write tocount - the number of bytes from the array to write outjava.io.IOException - if the url cannot be written to
public static void writeFile(java.net.URL url,
byte[] data,
int offset,
int count)
throws java.io.IOException
url - the url to write todata - the data to write outoffset - the offset in the array where the byte data startscount - the number of bytes from the array to write outjava.io.IOException - if the url cannot be written to