|
|||||||||
| Home >> All >> com >> mockobjects >> [ servlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.mockobjects.servlet
Class MockJspWriter

java.lang.Objectjava.io.Writer
javax.servlet.jsp.JspWriter
com.mockobjects.servlet.MockJspWriter
- public class MockJspWriter
- extends javax.servlet.jsp.JspWriter
| Field Summary | |
private com.mockobjects.ExpectationValue |
expectedData
|
private java.io.PrintWriter |
printWriter
|
private java.io.StringWriter |
stringWriter
|
| Fields inherited from class javax.servlet.jsp.JspWriter |
autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER |
| Fields inherited from class java.io.Writer |
lock |
| Constructor Summary | |
MockJspWriter()
|
|
| Method Summary | |
void |
clear()
Clear the contents of the buffer. |
void |
clearBuffer()
Clears the current contents of the buffer. |
void |
close()
Close the stream, flushing it first. |
void |
flush()
Flush the stream. |
int |
getRemaining()
This method returns the number of unused bytes in the buffer. |
void |
newLine()
Write a line separator. |
private void |
notImplemented()
|
void |
print(boolean b)
Print a boolean value. |
void |
print(char c)
Print a character. |
void |
print(char[] c)
Print an array of characters. |
void |
print(double d)
Print a double-precision floating-point number. |
void |
print(float f)
Print a floating-point number. |
void |
print(int anInt)
Print an integer. |
void |
print(long aLong)
Print a long integer. |
void |
print(java.lang.Object anObject)
Print an object. |
void |
print(java.lang.String aString)
Print a string. |
void |
println()
Terminate the current line by writing the line separator string. |
void |
println(boolean b)
Print a boolean value and then terminate the line. |
void |
println(char c)
Print a character and then terminate the line. |
void |
println(char[] c)
Print an array of characters and then terminate the line. |
void |
println(double d)
Print a double-precision floating-point number and then terminate the line. |
void |
println(float f)
Print a floating-point number and then terminate the line. |
void |
println(int i)
Print an integer and then terminate the line. |
void |
println(long l)
Print a long integer and then terminate the line. |
void |
println(java.lang.Object anObject)
Print an Object and then terminate the line. |
void |
println(java.lang.String aString)
Print a String and then terminate the line. |
void |
setExpectedData(java.lang.String data)
|
void |
verify()
|
void |
write(char[] buf,
int off,
int len)
This method writes len char from the specified array
buf starting at index offset into the array. |
| Methods inherited from class javax.servlet.jsp.JspWriter |
getBufferSize, isAutoFlush |
| Methods inherited from class java.io.Writer |
write, write, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
expectedData
private final com.mockobjects.ExpectationValue expectedData
stringWriter
private java.io.StringWriter stringWriter
printWriter
private java.io.PrintWriter printWriter
| Constructor Detail |
MockJspWriter
public MockJspWriter()
| Method Detail |
setExpectedData
public void setExpectedData(java.lang.String data)
notImplemented
private final void notImplemented()
newLine
public void newLine()
- Description copied from class:
javax.servlet.jsp.JspWriter - Write a line separator. The line separator string is defined by the
system property line.separator, and is not necessarily a single
newline ('\n') character.
flush
public void flush()
- Description copied from class:
javax.servlet.jsp.JspWriter - Flush the stream. If the stream has saved any characters from the
various write() methods in a buffer, write them immediately to their
intended destination. Then, if that destination is another character or
byte stream, flush it. Thus one flush() invocation will flush all the
buffers in a chain of Writers and OutputStreams.
The method may be invoked indirectly if the buffer size is exceeded.
Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown.
public void print(double d)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a double-precision floating-point number. The string produced by
String.valueOf(double)>String.valueOf(double)55 is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.
println
public void println()
- Description copied from class:
javax.servlet.jsp.JspWriter - Terminate the current line by writing the line separator string. The
line separator string is defined by the system property
line.separator, and is not necessarily a single newline character ('\n').
close
public void close()
- Description copied from class:
javax.servlet.jsp.JspWriter - Close the stream, flushing it first.
This method needs not be invoked explicitly for the initial JspWriter as the code generated by the JSP container will automatically include a call to close().
Closing a previously-closed stream, unlike flush(), has no effect.
public void print(int anInt)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print an integer. The string produced by
String.valueOf(int)>String.valueOf(int)55 is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.
public void print(long aLong)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a long integer. The string produced by
String.valueOf(long)>String.valueOf(long)55 is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.
public void print(float f)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a floating-point number. The string produced by
String.valueOf(float)>String.valueOf(float)55 is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.
println
public void println(char c)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a character and then terminate the line. This method behaves as
though it invokes
JspWriter.print(char)>JspWriter.print(char)55 and thenJspWriter.println()>JspWriter.println()55 .
clear
public void clear()
- Description copied from class:
javax.servlet.jsp.JspWriter - Clear the contents of the buffer. If the buffer has been already
been flushed then the clear operation shall throw an IOException
to signal the fact that some data has already been irrevocably
written to the client response stream.
public void print(boolean b)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a boolean value. The string produced by
String.valueOf(boolean)>String.valueOf(boolean)55 is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.
public void print(java.lang.String aString)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a string. If the argument is
nullthen the string"null"is printed. Otherwise, the string's characters are written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.
println
public void println(java.lang.String aString)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a String and then terminate the line. This method behaves as
though it invokes
JspWriter.print(String)>JspWriter.print(String)55 and thenJspWriter.println()>JspWriter.println()55 .
public void print(char c)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a character. The character is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
write
public void write(char[] buf,
int off,
int len)
- Description copied from class:
java.io.Writer - This method writes
lenchar from the specified arraybufstarting at indexoffsetinto the array.Subclasses must provide an implementation of this abstract method.
println
public void println(char[] c)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print an array of characters and then terminate the line. This method
behaves as though it invokes
print(char[])and thenprintln().
println
public void println(boolean b)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a boolean value and then terminate the line. This method behaves
as though it invokes
JspWriter.print(boolean)>JspWriter.print(boolean)55 and thenJspWriter.println()>JspWriter.println()55 .
clearBuffer
public void clearBuffer()
- Description copied from class:
javax.servlet.jsp.JspWriter - Clears the current contents of the buffer. Unlike clear(), this
method will not throw an IOException if the buffer has already been
flushed. It merely clears the current content of the buffer and
returns.
public void print(java.lang.Object anObject)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print an object. The string produced by the
String.valueOf(Object)>String.valueOf(Object)55 method is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.
println
public void println(long l)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a long integer and then terminate the line. This method behaves
as though it invokes
JspWriter.print(long)>JspWriter.print(long)55 and thenJspWriter.println()>JspWriter.println()55 .
println
public void println(int i)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print an integer and then terminate the line. This method behaves as
though it invokes
JspWriter.print(int)>JspWriter.print(int)55 and thenJspWriter.println()>JspWriter.println()55 .
public void print(char[] c)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print an array of characters. The characters are written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
println
public void println(float f)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a floating-point number and then terminate the line. This method
behaves as though it invokes
JspWriter.print(float)>JspWriter.print(float)55 and thenJspWriter.println()>JspWriter.println()55 .
println
public void println(double d)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print a double-precision floating-point number and then terminate the
line. This method behaves as though it invokes
JspWriter.print(double)>JspWriter.print(double)55 and thenJspWriter.println()>JspWriter.println()55 .
getRemaining
public int getRemaining()
- Description copied from class:
javax.servlet.jsp.JspWriter - This method returns the number of unused bytes in the buffer.
println
public void println(java.lang.Object anObject)
- Description copied from class:
javax.servlet.jsp.JspWriter - Print an Object and then terminate the line. This method behaves as
though it invokes
JspWriter.print(Object)>JspWriter.print(Object)55 and thenJspWriter.println()>JspWriter.println()55 .
verify
public void verify()
|
|||||||||
| Home >> All >> com >> mockobjects >> [ servlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC