org.benow.web.path.page.stream
Class StreamStreamer
java.lang.Object
org.benow.web.path.page.stream.StreamStreamer
- All Implemented Interfaces:
- ResultStreamer
public class StreamStreamer
- extends java.lang.Object
- implements ResultStreamer
A streamer of a stream, of course. Allows specification of content type and filename.
- Author:
- andy
|
Constructor Summary |
StreamStreamer(java.io.InputStream stream,
java.lang.String contentType,
java.lang.String fileName)
|
StreamStreamer(java.lang.String toStream,
java.lang.String contentType,
java.lang.String fileName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamStreamer
public StreamStreamer(java.io.InputStream stream,
java.lang.String contentType,
java.lang.String fileName)
StreamStreamer
public StreamStreamer(java.lang.String toStream,
java.lang.String contentType,
java.lang.String fileName)
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType in interface ResultStreamer
- Returns:
- the content type of the content to be streamed
getFilename
public java.lang.String getFilename()
- Specified by:
getFilename in interface ResultStreamer
- Returns:
- the suggested filename for the stream when saved, if exists.
stream
public void stream(java.io.OutputStream out,
org.w3c.dom.Element streamElem,
QueryParams params)
throws WebException,
java.io.IOException
- Specified by:
stream in interface ResultStreamer
- Parameters:
out - where to stream tostreamElem - input stream element that may hold param for stream procedureparams - params at time of stream
- Throws:
WebException - if something goes wrong
java.io.IOException