@Override /* Writeable */ public void writeTo(Writer w) throws IOException { if (varSession != null) varSession.resolveTo(contents, w); else w.write(contents); }
/** * Resolve variables in the specified string and sends the results to the specified writer. * * <p> * This is a shortcut for calling <code>createSession(<jk>null</jk>).resolveTo(s, w);</code>. * <br>This method can only be used if the string doesn't contain variables that rely on the existence of session * variables. * * @param s The input string. * @param w The writer to send the result to. * @throws IOException */ public void resolveTo(String s, Writer w) throws IOException { createSession(null).resolveTo(s, w); } }
/** * Resolve variables in the specified string and sends the results to the specified writer. * * <p> * This is a shortcut for calling <code>createSession(<jk>null</jk>).resolveTo(s, w);</code>. * <br>This method can only be used if the string doesn't contain variables that rely on the existence of session * variables. * * @param s The input string. * @param w The writer to send the result to. * @throws IOException */ public void resolveTo(String s, Writer w) throws IOException { createSession(null).resolveTo(s, w); } }
/** * Resolve variables in the specified string and sends the results to the specified writer. * * <p> * This is a shortcut for calling <code>createSession(<jk>null</jk>).resolveTo(s, w);</code>. * <br>This method can only be used if the string doesn't contain variables that rely on the existence of session * variables. * * @param s The input string. * @param w The writer to send the result to. * @throws IOException */ public void resolveTo(String s, Writer w) throws IOException { createSession(null).resolveTo(s, w); } }
@ResponseBody @Override /* Writeable */ public Writer writeTo(Writer w) throws IOException { for (Object o : contents) { if (o != null) { if (varSession == null) pipe(o, w); else varSession.resolveTo(read(o), w); } } return w; } }
@ResponseBody @Override /* Writeable */ public Writer writeTo(Writer w) throws IOException { for (Object o : contents) { if (o != null) { if (varSession == null) pipe(o, w); else varSession.resolveTo(read(o), w); } } return w; } }
@ResponseBody @Override /* Writeable */ public Writer writeTo(Writer w) throws IOException { for (Object o : contents) { if (o != null) { if (varSession == null) pipe(o, w); else varSession.resolveTo(read(o), w); } } return w; } }
return resolveTo(s, new StringWriter()).toString(); } catch (IOException e) { throw new RuntimeException(e); // Never happens.
return resolveTo(s, new StringWriter()).toString(); } catch (IOException e) { throw new RuntimeException(e); // Never happens.
return resolveTo(s, new StringWriter()).toString(); } catch (IOException e) { throw new RuntimeException(e); // Never happens.