Package jakarta.servlet.http
Class NoBodyOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- jakarta.servlet.ServletOutputStream
-
- jakarta.servlet.http.NoBodyOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
class NoBodyOutputStream extends ServletOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description private intcontentLengthprivate static java.lang.StringLSTRING_FILEprivate static java.util.ResourceBundlelStrings
-
Constructor Summary
Constructors Constructor Description NoBodyOutputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intgetContentLength()booleanisReady()This method can be used to determine if data can be written without blocking.voidsetWriteListener(WriteListener writeListener)Instructs theServletOutputStreamto invoke the providedWriteListenerwhen it is possible to writevoidwrite(byte[] buf, int offset, int len)voidwrite(int b)
-
-
-
Field Detail
-
LSTRING_FILE
private static final java.lang.String LSTRING_FILE
- See Also:
- Constant Field Values
-
lStrings
private static java.util.ResourceBundle lStrings
-
contentLength
private int contentLength
-
-
Method Detail
-
getContentLength
int getContentLength()
-
write
public void write(int b)
- Specified by:
writein classjava.io.OutputStream
-
write
public void write(byte[] buf, int offset, int len) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
isReady
public boolean isReady()
Description copied from class:ServletOutputStreamThis method can be used to determine if data can be written without blocking.- Specified by:
isReadyin classServletOutputStream- Returns:
trueif a write to thisServletOutputStreamwill succeed, otherwise returnsfalse.
-
setWriteListener
public void setWriteListener(WriteListener writeListener)
Description copied from class:ServletOutputStreamInstructs theServletOutputStreamto invoke the providedWriteListenerwhen it is possible to write- Specified by:
setWriteListenerin classServletOutputStream- Parameters:
writeListener- theWriteListenerthat should be notified when it's possible to write
-
-