java.lang.Object
com.renomad.minum.utils.FileReader
- All Implemented Interfaces:
IFileReader
Reads files from disk, optionally storing into a LRU cache.
-
Constructor Summary
ConstructorDescriptionFileReader
(Map<String, byte[]> lruCache, boolean useCacheForStaticFiles, ILogger logger) -
Method Summary
-
Constructor Details
-
FileReader
-
-
Method Details
-
readFile
Description copied from interface:IFileReader
Reads a file from disk.Protects against some common negative cases:
- If path is bad, log and return an empty byte array
- If file does not exist, log and return an empty byte array
- Specified by:
readFile
in interfaceIFileReader
- Throws:
IOException
-