public class CachingOutputStreamWrapper
extends javax.servlet.ServletOutputStream
| Constructor and Description |
|---|
CachingOutputStreamWrapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this output stream, causing any buffered data to be flushed and
any further output data to throw an IOException.
|
void |
flush()
`
Flush any buffered data for this output stream, which also causes the
response to be committed.
|
byte[] |
getBytes()
return the cached bytes
|
boolean |
isReady()
This method can be used to determine if data can be written without blocking.
|
void |
setWriteListener(javax.servlet.WriteListener writeListener) |
void |
write(byte[] b)
Write
b.length bytes from the specified byte array
to our output stream. |
void |
write(byte[] b,
int off,
int len)
Write
len bytes from the specified byte array, starting
at the specified offset, to our output stream. |
void |
write(int b)
Write the specified byte to our output stream.
|
public void write(int b)
throws IOException
write in class OutputStreamb - The byte to be writtenIOException - if an input/output error occurspublic void write(byte[] b)
throws IOException
b.length bytes from the specified byte array
to our output stream.write in class OutputStreamb - The byte array to be writtenIOException - if an input/output error occurspublic void write(byte[] b,
int off,
int len)
throws IOException
len bytes from the specified byte array, starting
at the specified offset, to our output stream.write in class OutputStreamb - The byte array containing the bytes to be writtenoff - Zero-relative starting offset of the bytes to be writtenlen - The number of bytes to be writtenIOException - if an input/output error occurspublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic boolean isReady()
public void setWriteListener(javax.servlet.WriteListener writeListener)
public byte[] getBytes()
Copyright © 2017. All rights reserved.