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
{
super(READONLY,NON_VOLATILE);
FileInputStream fis = new FileInputStream(file);
FileChannel fc = fis.getChannel();
_buf = fc.map(FileChannel.MapMode.READ_ONLY, 0, file.length());
setGetIndex(0);
setPutIndex((int)file.length());
_access=IMMUTABLE;
}
Warren,
I think you'll find this a windows problem:
http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows
See also this Sun bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4715154
Jan