Package com.drew.tools
Class FileUtil
java.lang.Object
com.drew.tools.FileUtil
A series of utility methods for working with the file system. The methods herein are used in unit testing.
Use them in production code at your own risk!
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
saveBytes
Saves the contents of abyte[]to the specifiedFile.- Throws:
IOException
-
readBytes
Reads the contents of aFileinto abyte[]. This relies uponFile.length()returning the correct value, which may not be the case when using a network file system. However this method is intended for unit test support, in which case the files should be on the local volume.- Throws:
IOException
-
readBytes
Reads the contents of aFileinto abyte[]. This relies uponFile.length()returning the correct value, which may not be the case when using a network file system. However this method is intended for unit test support, in which case the files should be on the local volume.- Throws:
IOException
-