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("}");
}

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 ( "}" ) ; }
closes the currently open write and writes out the following text as a gstring expression until it reaches an end % > .
