question: protected void skipComments ( char delimiter ) throws IOException { char ch ; int n = 1 ; boolean write = false ; StringBuffer meta = null ; if ( nextCharacter ( ) == writeComment ) { read ( ) ; write = true ; } else if ( nextCharacter ( ) == metaComment ) { read ( ) ; meta = lastMetaComment != null ? new StringBuffer ( lastMetaComment + ";" ) : new StringBuffer ( ) ; } lastMetaComment = null ; if ( delimiter == lineComment ) { String line = readLine ( ) ; if ( write && commentWriter != null ) { commentWriter . write ( line , 0 , line . length ( ) ) ; commentWriter . newLine ( ) ; } else if ( meta != null ) { meta . append ( line ) ; } } else { do { ch = read ( ) ; if ( ch == startComment ) { n ++ ; } else if ( ch == stopComment ) { if ( write && commentWriter != null ) { commentWriter . newLine ( ) ; } n -- ; } else if ( write && commentWriter != null ) { commentWriter . write ( ch ) ; } else if ( meta != null ) { meta . append ( ch ) ; } } while ( n > 0 ) ; } if ( meta != null ) { lastMetaComment = meta . toString ( ) ; } }
target:  Skips over any comments. The opening comment delimiter is passed.