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.ServletOutputStream
Coyote implementation of the servlet output stream.- Author:
- Costin Manolache, Remy Maucherat
-
-
Field Summary
Fields Modifier and Type Field Description protected OutputBuffer
ob
-
Constructor Summary
Constructors Constructor Description CoyoteOutputStream(OutputBuffer ob)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
clone()
Prevent cloning the facade.void
close()
void
flush()
Will send the buffer to the client.boolean
isReady()
void
print(String s)
void
setWriteListener(jakarta.servlet.WriteListener writeListener)
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(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:
clone
in classObject
- Returns:
- throws
CloneNotSupportedException
- Throws:
CloneNotSupportedException
- always
-
write
public void write(int i) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
Will send the buffer to the client.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
print
public void print(String s) throws IOException
- Overrides:
print
in classjakarta.servlet.ServletOutputStream
- Throws:
IOException
-
isReady
public boolean isReady()
- Specified by:
isReady
in classjakarta.servlet.ServletOutputStream
-
setWriteListener
public void setWriteListener(jakarta.servlet.WriteListener writeListener)
- Specified by:
setWriteListener
in classjakarta.servlet.ServletOutputStream
-
-