title: Detecting and handling third-party library filehandle leaks in Java
body: <p>Is there any way to detect and handle whether a Java library is correctly releasing file-handles (via "close") from <strong>within</strong> a Java program that is using said library, short of having access to the actual library code and inserting the corresponding "finally close" statements?</p>
  
  <p>If detection is feasible, is there any way to close those file-handles without a reference to the Reader (or FileInputStream) that was reading the file?</p>