public class FilteredDavResponse extends Object implements DavResponse
| Constructor and Description |
|---|
FilteredDavResponse(DavResponse response,
boolean calcContentLength,
boolean logOutput) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String key,
String value)
Adds a response header with the given name and value.
|
void |
finish() |
FilteredDavOutputStream |
geFilteredDavOutputStream() |
Object |
getOriginalResponse()
Returns the original response that will be handled by the chosen web container.
|
OutputStream |
getOutputStream()
Returns a
OutputStream suitable for writing binary
data in the response. |
boolean |
isCalcContentLength() |
void |
setCalcContentLength(boolean calcContentLength) |
void |
setCharacterEncoding(String s)
Sets the character encoding of the response.
|
void |
setContentLength(long length)
Sets the content length of the response.
|
void |
setContentType(String s)
Sets the MIME content type of the response
|
void |
setHeader(String s,
String s1)
Sets a response header with the given name and value.
|
void |
setStatus(int code,
String description)
Sets status code of the response.
|
String |
toString() |
public FilteredDavResponse(DavResponse response, boolean calcContentLength, boolean logOutput)
public boolean isCalcContentLength()
public FilteredDavOutputStream geFilteredDavOutputStream() throws IOException
IOExceptionpublic void setHeader(String s, String s1)
DavResponsesetHeader in interface DavResponses - Header name.s1 - Header value.public Object getOriginalResponse()
DavResponsegetOriginalResponse in interface DavResponsepublic void addHeader(String key, String value)
DavResponseaddHeader in interface DavResponsekey - Header name.value - Header value.public void setCalcContentLength(boolean calcContentLength)
public void setStatus(int code,
String description)
DavResponsesetStatus in interface DavResponsecode - Status code.description - Status description.public void setContentLength(long length)
DavResponsesetContentLength in interface DavResponselength - An long length of the response.public void finish()
throws IOException
IOExceptionpublic void setContentType(String s)
DavResponsesetContentType in interface DavResponses - Content type.public void setCharacterEncoding(String s)
DavResponsesetCharacterEncoding in interface DavResponses - String encoding.public OutputStream getOutputStream() throws IOException
DavResponseOutputStream suitable for writing binary
data in the response.getOutputStream in interface DavResponseOutputStream for writing binary data.IOException - if an input or output exception occurred.Copyright © ITHit. All Rights Reserved.