java.lang.Object
java.io.OutputStream
jakarta.servlet.ServletOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
DefaultWebApplicationResponse
The ServletOutputStream API.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract 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 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
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
-
Constructor Details
-
ServletOutputStream
protected ServletOutputStream()Constructor.
-
-
Method Details
-
isReady
public abstract boolean isReady()Is ready for output.- Returns:
- true if it is, false otherwise.
-
print
Print a string.- Parameters:
string
- the string.- Throws:
IOException
- when an I/O error occurs.
-
print
Print a boolean.- Parameters:
bool
- the boolean.- Throws:
IOException
- when an I/O error occurs.
-
print
Print a character.- Parameters:
character
- the character.- Throws:
IOException
- when an I/O error occurs.
-
print
Print an integer.- Parameters:
integer
- the integer.- Throws:
IOException
- when an I/O error occurs.
-
print
Print the long.- Parameters:
l
- the long.- Throws:
IOException
- when an I/O error occurs.
-
print
Print the float.- Parameters:
f
- the float.- Throws:
IOException
- when an I/O error occurs.
-
print
Print the double.- Parameters:
d
- the double.- Throws:
IOException
- when an I/O error occurs.
-
println
Print a carriage return and line feed.- Throws:
IOException
- when an I/O error occurs.
-
println
Print string with linefeed.- Parameters:
string
- the string.- Throws:
IOException
- when an I/O error occurs.
-
println
Print boolean with linefeed.- Parameters:
bool
- the boolean.- Throws:
IOException
- when an I/O error occurs.
-
println
Print character with linefeed.- Parameters:
character
- the character.- Throws:
IOException
- when an I/O error occurs.
-
println
Print integer with linefeed.- Parameters:
integer
- the integer.- Throws:
IOException
- when an I/O error occurs.
-
println
Print long with linefeed.- Parameters:
l
- the long.- Throws:
IOException
- when an I/O error occurs.
-
println
Print float with linefeed.- Parameters:
f
- the float.- Throws:
IOException
- when an I/O error occurs.
-
println
Print double with linefeed.- Parameters:
d
- the double.- Throws:
IOException
- when an I/O error occurs.
-
setWriteListener
Set the write listener.- Parameters:
writeListener
- the write listener.
-