|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.context Class ResponseWriterWrapper
java.lang.Object java.io.Writer javax.faces.context.ResponseWriter javax.faces.context.ResponseWriterWrapper
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public abstract class ResponseWriterWrapper
- extends ResponseWriter
提供 ResponseWriter
的简单实现,可供希望向现有 ResponseWriter
实例提供特殊行为的开发人员进行子类化。所有方法的默认实现均接通包装的 ResponseWriter
。
用法:扩展此类并重写 #getWrapped
,以返回包装的实例。
since | 1.2 |
Provides a simple implementation of ResponseWriter
that
can be subclassed by developers wishing to provide specialized
behavior to an existing ResponseWriter
instance. The default
implementation of all methods is to call through to the wrapped
ResponseWriter
.
Usage: extend this class and override getWrapped()
to
return the instance we are wrapping.
- Since:
- 1.2
Field Summary |
---|
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
ResponseWriterWrapper()
|
Method Summary | |
---|---|
ResponseWriter |
cloneWithWriter(Writer writer)
The default behavior of this method is to call ResponseWriter.cloneWithWriter(java.io.Writer)
on the wrapped ResponseWriter object. |
void |
close()
The default behavior of this method is to call Writer.close()
on the wrapped ResponseWriter object. |
void |
endDocument()
The default behavior of this method is to call ResponseWriter.endDocument()
on the wrapped ResponseWriter object. |
void |
endElement(String name)
The default behavior of this method is to call ResponseWriter.endElement(String)
on the wrapped ResponseWriter object. |
void |
flush()
The default behavior of this method is to call ResponseWriter.flush()
on the wrapped ResponseWriter object. |
String |
getCharacterEncoding()
The default behavior of this method is to call ResponseWriter.getCharacterEncoding()
on the wrapped ResponseWriter object. |
String |
getContentType()
The default behavior of this method is to call ResponseWriter.getContentType()
on the wrapped ResponseWriter object. |
protected abstract ResponseWriter |
getWrapped()
|
void |
startDocument()
The default behavior of this method is to call ResponseWriter.startDocument()
on the wrapped ResponseWriter object. |
void |
startElement(String name,
UIComponent component)
The default behavior of this method is to call ResponseWriter.startElement(String, javax.faces.component.UIComponent)
on the wrapped ResponseWriter object. |
void |
write(char[] cbuf,
int off,
int len)
The default behavior of this method is to call Writer.write(char[], int, int)
on the wrapped ResponseWriter object. |
void |
writeAttribute(String name,
Object value,
String property)
The default behavior of this method is to call ResponseWriter.writeAttribute(String, Object, String)
on the wrapped ResponseWriter object. |
void |
writeComment(Object comment)
The default behavior of this method is to call ResponseWriter.writeComment(Object)
on the wrapped ResponseWriter object. |
void |
writeText(char[] text,
int off,
int len)
The default behavior of this method is to call ResponseWriter.writeText(char[], int, int)
on the wrapped ResponseWriter object. |
void |
writeText(Object text,
String property)
The default behavior of this method is to call ResponseWriter.writeText(Object, String)
on the wrapped ResponseWriter object. |
void |
writeText(Object text,
UIComponent component,
String property)
The default behavior of this method is to call ResponseWriter.writeText(Object, UIComponent, String)
on the wrapped ResponseWriter object. |
void |
writeURIAttribute(String name,
Object value,
String property)
The default behavior of this method is to call ResponseWriter.writeURIAttribute(String, Object, String)
on the wrapped ResponseWriter object. |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
ResponseWriterWrapper()
英文文档:
ResponseWriterWrapper
public ResponseWriterWrapper()
Method Detail |
---|
abstract protected ResponseWriter
getWrapped()
return | 正在包装的实例。 |
getWrapped
protected abstract ResponseWriter getWrapped()
- Returns:
- the instance that we are wrapping.
public String
getContentType()
此方法的默认行为是对包装的 ResponseWriter
对象调用 getContentType()
。
since | 1.2 |
See also | getContentType() |
getContentType
public String getContentType()
The default behavior of this method is to call
ResponseWriter.getContentType()
on the wrappedResponseWriter
object.- Specified by:
getContentType
in classResponseWriter
- Since:
- 1.2
- See Also:
ResponseWriter.getContentType()
public String
getCharacterEncoding()
此方法的默认行为是对包装的 ResponseWriter
对象调用 getCharacterEncoding()
。
since | 1.2 |
See also | getCharacterEncoding() |
getCharacterEncoding
public String getCharacterEncoding()
The default behavior of this method is to call
ResponseWriter.getCharacterEncoding()
on the wrappedResponseWriter
object.- Specified by:
getCharacterEncoding
in classResponseWriter
- Since:
- 1.2
- See Also:
ResponseWriter.getCharacterEncoding()
public void
flush() throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 flush()
。
since | 1.2 |
See also | flush() |
flush
public void flush() throws IOException
The default behavior of this method is to call
ResponseWriter.flush()
on the wrappedResponseWriter
object.- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classResponseWriter
- Throws:
IOException
- Since:
- 1.2
- See Also:
ResponseWriter.flush()
public void
startDocument() throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 startDocument()
。
since | 1.2 |
See also | startDocument() |
startDocument
public void startDocument() throws IOException
The default behavior of this method is to call
ResponseWriter.startDocument()
on the wrappedResponseWriter
object.- Specified by:
startDocument
in classResponseWriter
- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.startDocument()
public void
endDocument() throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 endDocument()
。
since | 1.2 |
See also | endDocument() |
endDocument
public void endDocument() throws IOException
The default behavior of this method is to call
ResponseWriter.endDocument()
on the wrappedResponseWriter
object.- Specified by:
endDocument
in classResponseWriter
- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.endDocument()
public void
startElement(String name, UIComponent component) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 startElement(String, javax.faces.component.UIComponent)
。
since | 1.2 |
See also | startElement(String, javax.faces.component.UIComponent) |
startElement
public void startElement(String name, UIComponent component) throws IOException
The default behavior of this method is to call
ResponseWriter.startElement(String, javax.faces.component.UIComponent)
on the wrappedResponseWriter
object.- Specified by:
startElement
in classResponseWriter
- Parameters:
name
- Name of the element to be startedcomponent
- TheUIComponent
(if any) to which this element corresponds- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.startElement(String, javax.faces.component.UIComponent)
public void
endElement(String name) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 endElement(String)
。
since | 1.2 |
See also | endElement(String) |
endElement
public void endElement(String name) throws IOException
The default behavior of this method is to call
ResponseWriter.endElement(String)
on the wrappedResponseWriter
object.- Specified by:
endElement
in classResponseWriter
- Parameters:
name
- Name of the element to be ended- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.endElement(String)
public void
writeAttribute(String name, Object value, String property) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 writeAttribute(String, Object, String)
。
since | 1.2 |
See also | writeAttribute(String, Object, String) |
writeAttribute
public void writeAttribute(String name, Object value, String property) throws IOException
The default behavior of this method is to call
ResponseWriter.writeAttribute(String, Object, String)
on the wrappedResponseWriter
object.- Specified by:
writeAttribute
in classResponseWriter
- Parameters:
name
- Attribute name to be addedvalue
- Attribute value to be addedproperty
- Name of the property or attribute (if any) of theUIComponent
associated with the containing element, to which this generated attribute corresponds- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.writeAttribute(String, Object, String)
public void
writeURIAttribute(String name, Object value, String property) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 writeURIAttribute(String, Object, String)
。
since | 1.2 |
See also | writeURIAttribute(String, Object, String) |
writeURIAttribute
public void writeURIAttribute(String name, Object value, String property) throws IOException
The default behavior of this method is to call
ResponseWriter.writeURIAttribute(String, Object, String)
on the wrappedResponseWriter
object.- Specified by:
writeURIAttribute
in classResponseWriter
- Parameters:
name
- Attribute name to be addedvalue
- Attribute value to be addedproperty
- Name of the property or attribute (if any) of theUIComponent
associated with the containing element, to which this generated attribute corresponds- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.writeURIAttribute(String, Object, String)
public void
writeComment(Object comment) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 writeComment(Object)
。
since | 1.2 |
See also | writeComment(Object) |
writeComment
public void writeComment(Object comment) throws IOException
The default behavior of this method is to call
ResponseWriter.writeComment(Object)
on the wrappedResponseWriter
object.- Specified by:
writeComment
in classResponseWriter
- Parameters:
comment
- Text content of the comment- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.writeComment(Object)
public void
writeText(Object text, String property) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 writeText(Object, String)
。
since | 1.2 |
See also | writeText(Object, String) |
writeText
public void writeText(Object text, String property) throws IOException
The default behavior of this method is to call
ResponseWriter.writeText(Object, String)
on the wrappedResponseWriter
object.- Specified by:
writeText
in classResponseWriter
- Parameters:
text
- Text to be writtenproperty
- Name of the property or attribute (if any) of theUIComponent
associated with the containing element, to which this generated text corresponds- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.writeText(Object, String)
public void
writeText(Object text, UIComponent component, String property) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 writeText(Object, UIComponent, String)
。
since | 1.2 |
See also | writeText(Object, String) |
writeText
public void writeText(Object text, UIComponent component, String property) throws IOException
The default behavior of this method is to call
ResponseWriter.writeText(Object, UIComponent, String)
on the wrappedResponseWriter
object.- Overrides:
writeText
in classResponseWriter
- Parameters:
text
- Text to be writtencomponent
- TheUIComponent
(if any) to which this element correspondsproperty
- Name of the property or attribute (if any) of theUIComponent
associated with the containing element, to which this generated text corresponds- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.writeText(Object, String)
public void
writeText(char[] text, int off, int len) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 writeText(char[], int, int)
。
since | 1.2 |
See also | writeText(char[], int, int) |
writeText
public void writeText(char[] text, int off, int len) throws IOException
The default behavior of this method is to call
ResponseWriter.writeText(char[], int, int)
on the wrappedResponseWriter
object.- Specified by:
writeText
in classResponseWriter
- Parameters:
text
- Text to be writtenoff
- Starting offset (zero-relative)len
- Number of characters to be written- Throws:
IOException
- if an input/output error occurs- Since:
- 1.2
- See Also:
ResponseWriter.writeText(char[], int, int)
public ResponseWriter
cloneWithWriter(java.io.Writer writer)
此方法的默认行为是对包装的 ResponseWriter
对象调用 cloneWithWriter(java.io.Writer)
。
since | 1.2 |
See also | cloneWithWriter(java.io.Writer) |
cloneWithWriter
public ResponseWriter cloneWithWriter(Writer writer)
The default behavior of this method is to call
ResponseWriter.cloneWithWriter(java.io.Writer)
on the wrappedResponseWriter
object.- Specified by:
cloneWithWriter
in classResponseWriter
- Parameters:
writer
- TheWriter
that is the output destination- Since:
- 1.2
- See Also:
ResponseWriter.cloneWithWriter(java.io.Writer)
public void
close() throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 close()
。
since | 1.2 |
See also | close() |
close
public void close() throws IOException
The default behavior of this method is to call
Writer.close()
on the wrappedResponseWriter
object.- Throws:
IOException
- Since:
- 1.2
- See Also:
Writer.close()
public void
write(char[] cbuf, int off, int len) throws java.io.IOException
此方法的默认行为是对包装的 ResponseWriter
对象调用 write(char[], int, int)
。
since | 1.2 |
See also | write(char[], int, int) |
write
public void write(char[] cbuf, int off, int len) throws IOException
The default behavior of this method is to call
Writer.write(char[], int, int)
on the wrappedResponseWriter
object.- Throws:
IOException
- Since:
- 1.2
- See Also:
Writer.write(char[], int, int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!