| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.util.TextStreamResponse
public class TextStreamResponse
| Constructor Summary | |
|---|---|
TextStreamResponse(ContentType contentType,
                                     String text)
 | 
|
TextStreamResponse(String contentType,
                                     String text)
Constructor that defaults the character set to "utf-8".  | 
|
TextStreamResponse(String contentType,
                                     String charset,
                                     String text)
Constructor allowing the content type and character set to the specified.  | 
|
| Method Summary | |
|---|---|
 String | 
getContentType()
Returns the content type to be reported to the client.  | 
 InputStream | 
getStream()
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.  | 
 void | 
prepareResponse(Response response)
Does nothing; subclasses may override.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public TextStreamResponse(String contentType,
                          String text)
public TextStreamResponse(String contentType,
                          String charset,
                          String text)
contentType - type of content, often "text/xml"charset - character set of output, usually "UTF-8"text - text to be streamed in the responseSymbolConstants.CHARSET
public TextStreamResponse(ContentType contentType,
                          String text)
| Method Detail | 
|---|
public String getContentType()
StreamResponse
getContentType in interface StreamResponse
public InputStream getStream()
                      throws IOException
getStream in interface StreamResponseIOExceptionpublic void prepareResponse(Response response)
prepareResponse in interface StreamResponseresponse - Response that will be sent.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||