org.apache.tapestry.util
Class TextStreamResponse
java.lang.Object
org.apache.tapestry.util.TextStreamResponse
- All Implemented Interfaces:
- StreamResponse
public class TextStreamResponse
- extends Object
- implements StreamResponse
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextStreamResponse
public TextStreamResponse(String contentType,
String text)
getContentType
public String getContentType()
- Description copied from interface:
StreamResponse
- Returns the content type to be reported to the client.
- Specified by:
getContentType in interface StreamResponse
getStream
public InputStream getStream()
throws IOException
- Description copied from interface:
StreamResponse
- Returns the stream of bytes to be sent to the client. The stream will be closed when the end of the stream is
reached. The provided stream will be wrapped in a
BufferedInputStream for efficiency.
- Specified by:
getStream in interface StreamResponse
- Throws:
IOException
prepareResponse
public void prepareResponse(Response response)
- Description copied from interface:
StreamResponse
- Prepare response before it is sent to the client. This is the place to set any response headers (e.g.
content-disposition)
- Specified by:
prepareResponse in interface StreamResponse
- Parameters:
response - Response that will be sent.
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.