Package javax.servlet
Class ServletOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- javax.servlet.ServletOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
DefaultWebApplicationResponse
public abstract class ServletOutputStream extends OutputStream
The ServletOutputStream API.- Author:
- Manfred Riem ([email protected])
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ServletOutputStream()
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
isReady()
Is ready for output.void
print(boolean bool)
Print a boolean.void
print(char character)
Print a character.void
print(double d)
Print the double.void
print(float f)
Print the float.void
print(int integer)
Print an integer.void
print(long l)
Print the long.void
print(String string)
Print a string.void
println()
Print a carriage return and line feed.void
println(boolean bool)
Print boolean with linefeed.void
println(char character)
Print character with linefeed.void
println(double d)
Print double with linefeed.void
println(float f)
Print float with linefeed.void
println(int integer)
Print integer with linefeed.void
println(long l)
Print long with linefeed.void
println(String string)
Print string with linefeed.abstract void
setWriteListener(WriteListener writeListener)
Set the write listener.-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write, write
-
-
-
-
Method Detail
-
isReady
public abstract boolean isReady()
Is ready for output.- Returns:
- true if it is, false otherwise.
-
print
public void print(String string) throws IOException
Print a string.- Parameters:
string
- the string.- Throws:
IOException
- when an I/O error occurs.
-
print
public void print(boolean bool) throws IOException
Print a boolean.- Parameters:
bool
- the boolean.- Throws:
IOException
- when an I/O error occurs.
-
print
public void print(char character) throws IOException
Print a character.- Parameters:
character
- the character.- Throws:
IOException
- when an I/O error occurs.
-
print
public void print(int integer) throws IOException
Print an integer.- Parameters:
integer
- the integer.- Throws:
IOException
- when an I/O error occurs.
-
print
public void print(long l) throws IOException
Print the long.- Parameters:
l
- the long.- Throws:
IOException
- when an I/O error occurs.
-
print
public void print(float f) throws IOException
Print the float.- Parameters:
f
- the float.- Throws:
IOException
- when an I/O error occurs.
-
print
public void print(double d) throws IOException
Print the double.- Parameters:
d
- the double.- Throws:
IOException
- when an I/O error occurs.
-
println
public void println() throws IOException
Print a carriage return and line feed.- Throws:
IOException
- when an I/O error occurs.
-
println
public void println(String string) throws IOException
Print string with linefeed.- Parameters:
string
- the string.- Throws:
IOException
- when an I/O error occurs.
-
println
public void println(boolean bool) throws IOException
Print boolean with linefeed.- Parameters:
bool
- the boolean.- Throws:
IOException
- when an I/O error occurs.
-
println
public void println(char character) throws IOException
Print character with linefeed.- Parameters:
character
- the character.- Throws:
IOException
- when an I/O error occurs.
-
println
public void println(int integer) throws IOException
Print integer with linefeed.- Parameters:
integer
- the integer.- Throws:
IOException
- when an I/O error occurs.
-
println
public void println(long l) throws IOException
Print long with linefeed.- Parameters:
l
- the long.- Throws:
IOException
- when an I/O error occurs.
-
println
public void println(float f) throws IOException
Print float with linefeed.- Parameters:
f
- the float.- Throws:
IOException
- when an I/O error occurs.
-
println
public void println(double d) throws IOException
Print double with linefeed.- Parameters:
d
- the double.- Throws:
IOException
- when an I/O error occurs.
-
setWriteListener
public abstract void setWriteListener(WriteListener writeListener)
Set the write listener.- Parameters:
writeListener
- the write listener.
-
-