public class StreamConsequence extends Object implements Consequence
| Modifier and Type | Field and Description |
|---|---|
static String |
APPLICATION_OGG
Ogg, a multimedia bitstream container format.
|
static String |
APPLICATION_PDF
Portable Document Format.
|
static String |
APPLICATION_SOAP
SOAP.
|
static String |
AUDIO_MPEG
MP3 or other MPEG audio.
|
static String |
AUDIO_OGG
Ogg Vorbis, Speex, Flac and other audio.
|
static String |
CONTENT_DISPOSITION
The default key ("contentDisposition") to look for in the action output.
|
static String |
CONTENT_LENGTH
The default key ("contentLength") to look for in the action output.
|
static String |
CONTENT_TYPE
The default key ("contentType") to look for in the action output.
|
static String |
EXCEL |
static String |
FILENAME |
static String |
IMAGE_GIF
GIF image.
|
static String |
IMAGE_JPEG
JPEG JFIF image.
|
static String |
IMAGE_PNG
Portable Network Graphics.
|
static String |
STREAM
The default key ("stream") to look for in the action output.
|
| Constructor and Description |
|---|
StreamConsequence()
Creates a new instance of the StreamConsequence class.
|
StreamConsequence(String contentType)
Creates a new instance of the StreamConsequence class,
with the given content-type
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
defineHeader(javax.servlet.http.HttpServletResponse res,
Output output) |
void |
execute(Action a,
String result,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Executes the action, reading from the input stream the data that
has to be flushed into the servlet output stream.
|
StreamConsequence |
keyForContentDisposition(String key) |
StreamConsequence |
keyForContentLength(String key) |
StreamConsequence |
keyForContentType(String key) |
StreamConsequence |
keyForFilename(String key) |
StreamConsequence |
keyForStream(String key) |
public static final String STREAM
public static final String CONTENT_DISPOSITION
public static final String CONTENT_LENGTH
public static final String CONTENT_TYPE
public static final String APPLICATION_OGG
public static final String APPLICATION_PDF
public static final String APPLICATION_SOAP
public static final String AUDIO_MPEG
public static final String AUDIO_OGG
public static final String IMAGE_GIF
public static final String IMAGE_JPEG
public static final String IMAGE_PNG
public static final String EXCEL
public static final String FILENAME
public StreamConsequence()
public StreamConsequence(String contentType)
contentType - The content type to set in the servlet response.public StreamConsequence keyForFilename(String key)
public StreamConsequence keyForContentType(String key)
public StreamConsequence keyForContentDisposition(String key)
public StreamConsequence keyForContentLength(String key)
public StreamConsequence keyForStream(String key)
public void execute(Action a, String result, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws ConsequenceException
execute in interface Consequencea - The action that generated this consequence.result - The result generated by the action.req - The servlet request of the action.res - The servlet response of the action.ConsequenceExceptionprotected void defineHeader(javax.servlet.http.HttpServletResponse res,
Output output)
throws ConsequenceException
ConsequenceExceptionCopyright © 2015. All Rights Reserved.