Package httl.util

Examples of httl.util.UnsafeStringWriter


      } catch (IOException e) {
        throw new RuntimeException(e.getMessage(), e);
      }
      return output.toByteArray();
    } else {
      UnsafeStringWriter writer = new UnsafeStringWriter();
      try {
        render(parameters, writer);
      } catch (IOException e) {
        throw new RuntimeException(e.getMessage(), e);
      }
      return writer.toString();
    }
  }
View Full Code Here


* @author Liang Fei (liangfei0201 AT gmail DOT com)
*/
public class StringBuilderOutConverter implements Converter<StringBuilder, Writer> {

  public Writer convert(StringBuilder value, Map<String, Class<?>> types) throws IOException, ParseException {
    return new UnsafeStringWriter(value);
  }
View Full Code Here

  public void render() throws IOException, ParseException {
    render(null, Context.getContext().getOut());
  }

  public Object evaluate(Object context) throws ParseException {
    UnsafeStringWriter writer = new UnsafeStringWriter();
    try {
      render(context, writer);
    } catch (IOException e) {
      throw new RuntimeException(e.getMessage(), e);
    }
    return writer.toString();
  }
View Full Code Here

TOP

Related Classes of httl.util.UnsafeStringWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.