public boolean read ( ) throws IOException { valid = false ; File file = new File ( filename ) ; FileReader reader = new FileReader ( file ) ; if ( file . exists ( ) ) { // Load the file contents contents = getContents ( reader , "\n" ) ; if ( contents != null ) valid = true ; else logger . severe ( "Unable to read file contents: " + file . getAbsolutePath ( ) ) ; } else { logger . severe ( "File does not exist: " + file . getAbsolutePath ( ) ) ; } try { if ( reader != null ) reader . close ( ) ; } catch ( IOException e ) { } return valid ; }
Reads the contents of the file .