question: protected void doValidateTextContents ( String path , String filename , String contents ) { File inFile = new File ( path , filename ) ; BufferedReader fileReader = null ; BufferedReader textReader = null ; Log . i ( LOG_TAG , "Validating file " + filename + " at " + path ) ; try { fileReader = new BufferedReader ( new FileReader ( inFile ) ) ; textReader = new BufferedReader ( new StringReader ( contents ) ) ; String actual = null ; String expected = null ; while ( ( actual = fileReader . readLine ( ) ) != null ) { expected = textReader . readLine ( ) ; if ( ! actual . equals ( expected ) ) { fail ( "File " + filename + " in OBB " + path + " does not match expected value" ) ; } } fileReader . close ( ) ; textReader . close ( ) ; Log . i ( LOG_TAG , "File " + filename + " successfully verified." ) ; } catch ( IOException e ) { fail ( "IOError with file " + inFile + ":" + e . toString ( ) ) ; } }
target:  Helper to validate the contents of a text file in an OBB