|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
javax.faces.context.ResponseWriter
org.apache.myfaces.test.mock.MockResponseWriter
public class MockResponseWriter
Mock implementation of javax.faces.context.ResponseWriter.
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
MockResponseWriter(Writer writer)
|
|
MockResponseWriter(Writer writer,
String contentType,
String characterEncoding)
Construct an instance wrapping the specified writer. |
|
| Method Summary | |
|---|---|
javax.faces.context.ResponseWriter |
cloneWithWriter(Writer writer)
|
void |
close()
|
void |
endDocument()
|
void |
endElement(String name)
|
void |
flush()
|
String |
getCharacterEncoding()
|
String |
getContentType()
|
Writer |
getWriter()
Return the Writer that we are wrapping. |
void |
startDocument()
|
void |
startElement(String name,
javax.faces.component.UIComponent component)
|
void |
write(char[] cbuf,
int off,
int len)
|
void |
writeAttribute(String name,
Object value,
String property)
|
void |
writeComment(Object comment)
|
void |
writeText(char[] text,
int off,
int len)
|
void |
writeText(Object text,
String property)
|
void |
writeURIAttribute(String name,
Object value,
String property)
|
| Methods inherited from class javax.faces.context.ResponseWriter |
|---|
writeText |
| 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 MockResponseWriter(Writer writer)
public MockResponseWriter(Writer writer,
String contentType,
String characterEncoding)
Construct an instance wrapping the specified writer.
writer - Writer we are wrappingcontentType - Content type to be createdcharacterEncoding - Character encoding of this response| Method Detail |
|---|
public Writer getWriter()
Return the Writer that we are wrapping.
public javax.faces.context.ResponseWriter cloneWithWriter(Writer writer)
cloneWithWriter in class javax.faces.context.ResponseWriter
public void endDocument()
throws IOException
endDocument in class javax.faces.context.ResponseWriterIOException
public void endElement(String name)
throws IOException
endElement in class javax.faces.context.ResponseWriterIOExceptionpublic String getCharacterEncoding()
getCharacterEncoding in class javax.faces.context.ResponseWriterpublic String getContentType()
getContentType in class javax.faces.context.ResponseWriter
public void flush()
throws IOException
flush in interface Flushableflush in class javax.faces.context.ResponseWriterIOException
public void startDocument()
throws IOException
startDocument in class javax.faces.context.ResponseWriterIOException
public void startElement(String name,
javax.faces.component.UIComponent component)
throws IOException
startElement in class javax.faces.context.ResponseWriterIOException
public void writeAttribute(String name,
Object value,
String property)
throws IOException
writeAttribute in class javax.faces.context.ResponseWriterIOException
public void writeComment(Object comment)
throws IOException
writeComment in class javax.faces.context.ResponseWriterIOException
public void writeText(Object text,
String property)
throws IOException
writeText in class javax.faces.context.ResponseWriterIOException
public void writeText(char[] text,
int off,
int len)
throws IOException
writeText in class javax.faces.context.ResponseWriterIOException
public void writeURIAttribute(String name,
Object value,
String property)
throws IOException
writeURIAttribute in class javax.faces.context.ResponseWriterIOException
public void close()
throws IOException
close in interface Closeableclose in class WriterIOException
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||