The issue is stemming from the specificied line of code in this try block:
try {
fInputStream = new FileInputStream(path);
#thisLine byteCount += IOUtils.copyLarge(fInputStream, fOutputStream);
fileCount++;
}
The stack-trace looks like this:
java.io.IOException: The process cannot access the file because another
process has locked a portion
of the file
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:233)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1719)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1696)
This seems to be a Windows-specific issue. Is there some File I/O best practice(s) specific to Windows that I might be missing?