added a comment - - edited
This might be fixed, since the DirectNIOBuffer class simply by its' construction is leaving input streams open.
There are options;
1) provide a mechanism for the caller to cleanup after it,
2) have DirectNIOBuffer clean up after itself - I realize this is the most difficult
3) provide a constructor that accepts the input stream so the caller can take care of this, if needed
There are various options that could be pursued. Stating this is simply a windows issue, means this class is not really usable for those few of us that are actually using windows.
public DirectNIOBuffer(File file) throws IOException
FileInputStream fis = new FileInputStream(file);
FileChannel fc = fis.getChannel();
_buf = fc.map(FileChannel.MapMode.READ_ONLY, 0, file.length());