1 package com.opensymphony.module.sitemesh.html; 2 3 import com.opensymphony.module.sitemesh.html.util.CharArray; 4 5 /** 6 * Text returned by HTMLTagTokenizer. 7 * 8 * @see com.opensymphony.module.sitemesh.html.tokenizer.TokenHandler 9 * @see com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer 10 * 11 * @author Joe Walnes 12 */ 13 public interface Text { 14 15 /** 16 * Get the complete contents of the text block, preserving original formatting. 17 * 18 * This has a slight overhead in that it needs to construct a String. For improved performance, use writeTo() instead. 19 * 20 * @see #writeTo(com.opensymphony.module.sitemesh.html.util.CharArray) 21 */ 22 String getContents(); 23 24 /** 25 * Write out the complete contents of the text block, preserving original formatting. 26 */ 27 void writeTo(CharArray out); 28 29 } 30