|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JavaTM Platform, Enterprise Edition, v 5.0
javax.servlet.jsp
|
Field Summary | |
---|---|
protected boolean |
autoFlush
Whether the JspWriter is autoflushing. |
protected int |
bufferSize
The size of the buffer used by the JspWriter. |
static int |
DEFAULT_BUFFER
Constant indicating that the Writer is buffered and is using the implementation default buffer size. |
static int |
NO_BUFFER
Constant indicating that the Writer is not buffering output. |
static int |
UNBOUNDED_BUFFER
Constant indicating that the Writer is buffered and is unbounded; this is used in BodyContent. |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
protected |
JspWriter(int bufferSize,
boolean autoFlush)
Protected constructor. |
Method Summary | |
---|---|
abstract void |
clear()
Clear the contents of the buffer. |
abstract void |
clearBuffer()
Clears the current contents of the buffer. |
abstract void |
close()
Close the stream, flushing it first. |
abstract void |
flush()
Flush the stream. |
int |
getBufferSize()
This method returns the size of the buffer used by the JspWriter. |
abstract int |
getRemaining()
This method returns the number of unused bytes in the buffer. |
boolean |
isAutoFlush()
This method indicates whether the JspWriter is autoFlushing. |
abstract void |
newLine()
Write a line separator. |
abstract void |
print(boolean b)
Print a boolean value. |
abstract void |
print(char c)
Print a character. |
abstract void |
print(char[] s)
Print an array of characters. |
abstract void |
print(double d)
Print a double-precision floating-point number. |
abstract void |
print(float f)
Print a floating-point number. |
abstract void |
print(int i)
Print an integer. |
abstract void |
print(long l)
Print a long integer. |
abstract void |
print(Object obj)
Print an object. |
abstract void |
print(String s)
Print a string. |
abstract void |
println()
Terminate the current line by writing the line separator string. |
abstract void |
println(boolean x)
Print a boolean value and then terminate the line. |
abstract void |
println(char x)
Print a character and then terminate the line. |
abstract void |
println(char[] x)
Print an array of characters and then terminate the line. |
abstract void |
println(double x)
Print a double-precision floating-point number and then terminate the line. |
abstract void |
println(float x)
Print a floating-point number and then terminate the line. |
abstract void |
println(int x)
Print an integer and then terminate the line. |
abstract void |
println(long x)
Print a long integer and then terminate the line. |
abstract void |
println(Object x)
Print an Object and then terminate the line. |
abstract void |
println(String x)
Print a String and then terminate the line. |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NO_BUFFER
public static final int DEFAULT_BUFFER
public static final int UNBOUNDED_BUFFER
protected int bufferSize
protected boolean autoFlush
Constructor Detail |
---|
protected JspWriter(int bufferSize, boolean autoFlush)
bufferSize
- the size of the buffer to be used by the JspWriterautoFlush
- whether the JspWriter should be autoflushingMethod Detail |
---|
public abstract void newLine() throws IOException
IOException
- If an I/O error occurspublic abstract void print(boolean b) throws IOException
String.valueOf(boolean)
is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
b
- The boolean
to be printed
IOException
- If an error occured while writingpublic abstract void print(char c) throws IOException
c
- The char
to be printed
IOException
- If an error occured while writingpublic abstract void print(int i) throws IOException
String.valueOf(int)
is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
i
- The int
to be printed
IOException
- If an error occured while writingInteger.toString(int)
public abstract void print(long l) throws IOException
String.valueOf(long)
is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
l
- The long
to be printed
IOException
- If an error occured while writingLong.toString(long)
public abstract void print(float f) throws IOException
String.valueOf(float)
is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
f
- The float
to be printed
IOException
- If an error occured while writingFloat.toString(float)
public abstract void print(double d) throws IOException
String.valueOf(double)
is written to
the JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
d
- The double
to be printed
IOException
- If an error occured while writingDouble.toString(double)
public abstract void print(char[] s) throws IOException
s
- The array of chars to be printed
NullPointerException
- If s
is null
IOException
- If an error occured while writingpublic abstract void print(String s) throws IOException
null
then 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.
s
- The String
to be printed
IOException
- If an error occured while writingpublic abstract void print(Object obj) throws IOException
String.valueOf(Object)
method is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
obj
- The Object
to be printed
IOException
- If an error occured while writingObject.toString()
public abstract void println() throws IOException
line.separator
, and is not necessarily a single newline
character ('\n'
).
IOException
- If an error occured while writingpublic abstract void println(boolean x) throws IOException
print(boolean)
and then
println()
.
x
- the boolean to write
IOException
- If an error occured while writingpublic abstract void println(char x) throws IOException
print(char)
and then println()
.
x
- the char to write
IOException
- If an error occured while writingpublic abstract void println(int x) throws IOException
print(int)
and then println()
.
x
- the int to write
IOException
- If an error occured while writingpublic abstract void println(long x) throws IOException
print(long)
and then
println()
.
x
- the long to write
IOException
- If an error occured while writingpublic abstract void println(float x) throws IOException
print(float)
and then
println()
.
x
- the float to write
IOException
- If an error occured while writingpublic abstract void println(double x) throws IOException
print(double)
and then println()
.
x
- the double to write
IOException
- If an error occured while writingpublic abstract void println(char[] x) throws IOException
print(char[])
and then
println()
.
x
- the char[] to write
IOException
- If an error occured while writingpublic abstract void println(String x) throws IOException
print(String)
and then
println()
.
x
- the String to write
IOException
- If an error occured while writingpublic abstract void println(Object x) throws IOException
print(Object)
and then
println()
.
x
- the Object to write
IOException
- If an error occured while writingpublic abstract void clear() throws IOException
IOException
- If an I/O error occurspublic abstract void clearBuffer() throws IOException
IOException
- If an I/O error occurspublic abstract void flush() throws IOException
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.
IOException
- If an I/O error occurspublic abstract void close() throws IOException
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.
IOException
- If an I/O error occurspublic int getBufferSize()
public abstract int getRemaining()
public boolean isAutoFlush()