Package org.apache.xmlrpc.webserver
Class ServletOutputStreamImpl
- java.lang.Object
-
- java.io.OutputStream
-
- javax.servlet.ServletOutputStream
-
- org.apache.xmlrpc.webserver.ServletOutputStreamImpl
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
class ServletOutputStreamImpl extends javax.servlet.ServletOutputStream
Default implementation of a servlet output stream. Handles output of HTTP headers.
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
buffer
private int
bufferOffset
private boolean
closed
private boolean
committed
private HttpServletResponseImpl
res
private java.io.OutputStream
target
-
Constructor Summary
Constructors Constructor Description ServletOutputStreamImpl(java.io.OutputStream pTarget, HttpServletResponseImpl pResponse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
private void
flush(boolean pClosing)
(package private) boolean
isCommitted()
boolean
isReady()
(package private) void
reset()
void
setWriteListener(javax.servlet.WriteListener arg0)
void
write(byte[] pChars, int pOffset, int pLen)
void
write(int b)
-
-
-
Field Detail
-
target
private final java.io.OutputStream target
-
res
private final HttpServletResponseImpl res
-
buffer
private final byte[] buffer
-
bufferOffset
private int bufferOffset
-
closed
private boolean closed
-
committed
private boolean committed
-
-
Constructor Detail
-
ServletOutputStreamImpl
ServletOutputStreamImpl(java.io.OutputStream pTarget, HttpServletResponseImpl pResponse)
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException
- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] pChars, int pOffset, int pLen) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
flush
private void flush(boolean pClosing) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
reset
void reset()
-
isCommitted
boolean isCommitted()
-
isReady
public boolean isReady()
- Specified by:
isReady
in classjavax.servlet.ServletOutputStream
-
setWriteListener
public void setWriteListener(javax.servlet.WriteListener arg0)
- Specified by:
setWriteListener
in classjavax.servlet.ServletOutputStream
-
-