question: private void groovyExpression ( Reader reader , StringWriter sw ) throws IOException { sw . write ( "${" ) ; int c ; while ( ( c = reader . read ( ) ) != - 1 ) { if ( c == '%' ) { c = reader . read ( ) ; if ( c != '>' ) { sw . write ( '%' ) ; } else { break ; } } if ( c != '\n' && c != '\r' ) { sw . write ( c ) ; } } sw . write ( "}" ) ; }
target:  Closes the currently open write and writes out the following text as a GString expression until it reaches an end %>.