Input:
File file = new File("some_file_that_is_in_use_by_windows.DLL");
if(file.exists() && file.canRead() && file.canWrite())
{
InputStream stream = new FileInputStream(file);
}
Output:
java.io.FileNotFoundException
Javadoc:
Throws:
FileNotFoundException - if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.
: