Package gov.nih.mipav.model.file
Class MetadataExtractor.FileUtil
java.lang.Object
gov.nih.mipav.model.file.MetadataExtractor.FileUtil
- Enclosing class:
MetadataExtractor
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!
- Author:
- Drew Noakes https://drewnoakes.com
-
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
-