Package org.apache.catalina.connector
Class CoyoteOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- jakarta.servlet.ServletOutputStream
-
- org.apache.catalina.connector.CoyoteOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class CoyoteOutputStream extends jakarta.servlet.ServletOutputStreamCoyote implementation of the servlet output stream.- Author:
- Costin Manolache, Remy Maucherat
-
-
Field Summary
Fields Modifier and Type Field Description protected OutputBufferob
-
Constructor Summary
Constructors Constructor Description CoyoteOutputStream(OutputBuffer ob)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Objectclone()Prevent cloning the facade.voidclose()voidflush()Will send the buffer to the client.booleanisReady()voidprint(String s)voidsetWriteListener(jakarta.servlet.WriteListener writeListener)voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int i)-
Methods inherited from class jakarta.servlet.ServletOutputStream
print, print, print, print, print, print, println, println, println, println, println, println, println, println
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Field Detail
-
ob
protected OutputBuffer ob
-
-
Constructor Detail
-
CoyoteOutputStream
public CoyoteOutputStream(OutputBuffer ob)
-
-
Method Detail
-
clone
protected Object clone() throws CloneNotSupportedException
Prevent cloning the facade.- Overrides:
clonein classObject- Returns:
- throws
CloneNotSupportedException - Throws:
CloneNotSupportedException- always
-
write
public void write(int i) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOExceptionWill send the buffer to the client.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
print
public void print(String s) throws IOException
- Overrides:
printin classjakarta.servlet.ServletOutputStream- Throws:
IOException
-
isReady
public boolean isReady()
- Specified by:
isReadyin classjakarta.servlet.ServletOutputStream
-
setWriteListener
public void setWriteListener(jakarta.servlet.WriteListener writeListener)
- Specified by:
setWriteListenerin classjakarta.servlet.ServletOutputStream
-
-