public List < T > readRows ( BufferedReader bufferedReader , Collection < ParseError > parseErrors ) throws IOException , ParseException { checkEntityConfig ( ) ; ParseError parseError = null ; // we do this to reuse the parse error objects if we can if ( parseErrors != null ) { parseError = new ParseError ( ) ; } List < T > results = new ArrayList < T > ( ) ; while ( true ) { if ( parseError != null ) { parseError . reset ( ) ; } T result = readRow ( bufferedReader , parseError ) ; if ( result != null ) { results . add ( result ) ; } else if ( parseError != null && parseError . isError ( ) ) { // if there was an error then add it to the list parseErrors . add ( parseError ) ; // once we use it, we need to create another one parseError = new ParseError ( ) ; } else { // if no result and no error then EOF return results ; } } }
Read in all of the entities in the reader passed in but without the header .