Home » tapestry-src-5.0.19 » org.apache.tapestry5.util » [javadoc | source]
org.apache.tapestry5.util
public class: TextStreamResponse [javadoc | source]
java.lang.Object
   org.apache.tapestry5.util.TextStreamResponse

All Implemented Interfaces:
    StreamResponse

Constructor:
 public TextStreamResponse(String contentType,
    String text) 
    Constructor that defaults the character set to "utf-8".
 public TextStreamResponse(ContentType contentType,
    String text) 
 public TextStreamResponse(String contentType,
    String charset,
    String text) 
    Constructor allowing the content type and character set to the specified.
    Parameters:
    contentType - type of content, often "text/xml"
    charset - character set of output, usually "UTF-8"
    text - text to be streamed in the response
    Also see:
    org.apache.tapestry5.SymbolConstants#CHARSET
Method from org.apache.tapestry5.util.TextStreamResponse Summary:
getContentType,   getStream,   prepareResponse
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tapestry5.util.TextStreamResponse Detail:
 public String getContentType() 
 public InputStream getStream() throws IOException 
    Converts the text to a byte array (as per the character set, which is usually "UTF-8"), and returns a stream for that byte array.
 public  void prepareResponse(Response response) 
    Does nothing; subclasses may override.