public Object read ( ) throws IOException { if ( LOGGER . isLoggable ( Level . FINE ) ) { LOGGER . fine ( "Reading " + file ) ; } try ( InputStream in = new BufferedInputStream ( Files . newInputStream ( file . toPath ( ) ) ) ) { return xs . fromXML ( in ) ; } catch ( RuntimeException | Error e ) { throw new IOException ( "Unable to read " + file , e ) ; } }
Loads the contents of this file into a new object .