public void writeTo(SitemeshBufferFragment.Builder buffer, int position) { buffer.insert( position, SitemeshBufferFragment.builder() .setBuffer(new DefaultSitemeshBuffer(input)) .setStart(position) .setLength(length) .build()); }
public String getHead() { if (head != null) { StringWriter headString = new StringWriter(); try { head.writeTo(headString); } catch (IOException e) { throw new RuntimeException("IOException occured while writing to buffer?", e); } return headString.toString(); } else { return ""; } }
public void writeHead(Writer out) throws IOException { if (head != null) { head.writeTo(out); } }