|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectHttpServletResponseWrapper
org.apache.velocity.tools.view.ImportSupport.ImportResponseWrapper
protected class ImportSupport.ImportResponseWrapper
Wraps responses to allow us to retrieve results as Strings.
Field Summary | |
---|---|
private java.io.ByteArrayOutputStream |
bos
A buffer, alternatively, to accumulate bytes. |
private boolean |
isStreamUsed
'True if getOutputStream() was called; false otherwise. |
private boolean |
isWriterUsed
'True' if getWriter() was called; false otherwise. |
private int |
status
The HTTP status set by the target. |
private java.io.StringWriter |
sw
The Writer we convey. |
Constructor Summary | |
---|---|
ImportSupport.ImportResponseWrapper(HttpServletResponse response)
Constructs a new ImportResponseWrapper. |
Method Summary | |
---|---|
ServletOutputStream |
getOutputStream()
|
int |
getStatus()
|
java.lang.String |
getString()
Retrieves the buffered output, using the containing tag's 'charEncoding' attribute, or the tag's default encoding, if necessary. |
java.io.PrintWriter |
getWriter()
|
void |
setContentType(java.lang.String x)
Has no effect. |
void |
setLocale(java.util.Locale x)
Has no effect. |
void |
setStatus(int status)
Sets the status of the response |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.io.StringWriter sw
private java.io.ByteArrayOutputStream bos
private boolean isWriterUsed
private boolean isStreamUsed
private int status
Constructor Detail |
---|
public ImportSupport.ImportResponseWrapper(HttpServletResponse response)
response
- the response to wrapMethod Detail |
---|
public java.io.PrintWriter getWriter()
public ServletOutputStream getOutputStream()
public void setContentType(java.lang.String x)
public void setLocale(java.util.Locale x)
public void setStatus(int status)
status
- the status codepublic int getStatus()
public java.lang.String getString() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
- if the encoding is not supported
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |