类 ImportSupport.ImportResponseWrapper
java.lang.Object
HttpServletResponseWrapper
org.apache.velocity.tools.view.ImportSupport.ImportResponseWrapper
- 封闭类:
- ImportSupport
protected static class ImportSupport.ImportResponseWrapper
extends HttpServletResponseWrapper
Wraps responses to allow us to retrieve results as Strings.
-
字段概要
字段修饰符和类型字段说明private ByteArrayOutputStream
A buffer, alternatively, to accumulate bytes.private boolean
'True if getOutputStream() was called; false otherwise.private boolean
'True' if getWriter() was called; false otherwise.private int
The HTTP status set by the target.private StringWriter
The Writer we convey. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明ServletOutputStream
int
Retrieves the buffered output, using the containing tag's 'charEncoding' attribute, or the tag's default encoding, if necessary.void
Has no effect.void
Has no effect.void
setStatus
(int status) Sets the status of the response
-
字段详细资料
-
sw
The Writer we convey. -
bos
A buffer, alternatively, to accumulate bytes. -
isWriterUsed
private boolean isWriterUsed'True' if getWriter() was called; false otherwise. -
isStreamUsed
private boolean isStreamUsed'True if getOutputStream() was called; false otherwise. -
status
private int statusThe HTTP status set by the target.
-
-
构造器详细资料
-
ImportResponseWrapper
public ImportResponseWrapper(HttpServletResponse response) Constructs a new ImportResponseWrapper.- 参数:
response
- the response to wrap
-
-
方法详细资料
-
getWriter
- 返回:
- a Writer designed to buffer the output.
-
getOutputStream
public ServletOutputStream getOutputStream()- 返回:
- a ServletOutputStream designed to buffer the output.
-
setContentType
Has no effect. -
setLocale
Has no effect. -
setStatus
public void setStatus(int status) Sets the status of the response- 参数:
status
- the status code
-
getStatus
public int getStatus()- 返回:
- the status of the response
-
getString
Retrieves the buffered output, using the containing tag's 'charEncoding' attribute, or the tag's default encoding, if necessary.- 返回:
- the buffered output
- 抛出:
UnsupportedEncodingException
- if the encoding is not supported
-