@ Override public File getFile ( ) throws IOException { try { return this . path . toFile ( ) ; } catch ( UnsupportedOperationException ex ) { // only Paths on the default file system can be converted to a File // do exception translation for cases where conversion is not possible throw new FileNotFoundException ( this . path + " cannot be resolved to " + "absolute file path" ) ; } }
This implementation returns the underlying File reference .