|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
javax.servlet.ServletOutputStream
org.norther.tammi.spray.filter.chain.ServletOutputStreamWrapper
public class ServletOutputStreamWrapper
A servlet output stream wrapper supporting a flush callback.
Note that the wrapped stream is not closed by the close method of this stream.
| Constructor Summary | |
|---|---|
ServletOutputStreamWrapper()
Constructs a new output stream. |
|
ServletOutputStreamWrapper(OutputStream out)
Constructs a new output stream with an adapter. |
|
ServletOutputStreamWrapper(OutputStream out,
Flushable flush)
Constructs a new output stream with an adapter and callback. |
|
ServletOutputStreamWrapper(OutputStream out,
Flushable flush,
byte[] buf)
Constructs a new output stream with an adapter, callback and an external buffer. |
|
ServletOutputStreamWrapper(OutputStream out,
Flushable flush,
int size)
Constructs a new output stream with an adapter, callback and a specific buffer size. |
|
| Method Summary | |
|---|---|
void |
close()
Marks the stream as closed, but doesn't close the wrapped one. |
void |
flush()
|
int |
getBufferSize()
Gets the buffer size. |
int |
getByteCount()
Gets the byte count. |
boolean |
isChunked()
Checks wheher chunked. |
boolean |
isClosed()
Check whether the stream is closed. |
boolean |
isFlushed()
Gets the flushed flag. |
boolean |
reset()
Resets the stream if it has not been flushed. |
boolean |
setChunked(boolean chunk)
Sets chunked if not yet flushed. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class javax.servlet.ServletOutputStream |
|---|
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServletOutputStreamWrapper()
public ServletOutputStreamWrapper(OutputStream out)
out - the wrapped output stream.
public ServletOutputStreamWrapper(OutputStream out,
Flushable flush)
out - the wrapped output stream.flush - a flushable callback.
public ServletOutputStreamWrapper(OutputStream out,
Flushable flush,
int size)
out - the wrapped output stream.flush - a flushable callback.size - the buffer size.
public ServletOutputStreamWrapper(OutputStream out,
Flushable flush,
byte[] buf)
out - the wrapped output stream.flush - a flushable callback.buf - the buffer.| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOException - on errors.public boolean reset()
public int getBufferSize()
public int getByteCount()
public boolean isFlushed()
public boolean isChunked()
public boolean setChunked(boolean chunk)
chunk - a chunk flag.
public boolean isClosed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||