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 != ' ' && c != ' ' ) { sw . write ( c ) ; } } sw . write ( "}" ) ; }
Closes the currently open write and writes out the following text as a GString expression until it reaches an end % > .