public void dump ( Writer writer , String lineSeparator ) throws IOException { for ( int i = 0 ; i < this . getRecordLenth ( ) ; i ++ ) { StringBuilder txt = new StringBuilder ( ) ; try ( StringReader reader = new StringReader ( StringUtils . trimToEmpty ( this . get ( i ) ) ) ) { for ( String line : IOUtils . readLines ( reader ) ) { if ( txt . length ( ) > 0 ) txt . append ( lineSeparator ) ; txt . append ( line ) ; } } writer . write ( i + ":" + txt . toString ( ) ) ; writer . write ( System . lineSeparator ( ) ) ; } }
Write content of the record in a human readable form .