public class GZipResponseStream
extends javax.servlet.ServletOutputStream
| Constructor and Description |
|---|
GZipResponseStream(javax.servlet.http.HttpServletResponse response,
int threshold)
Constructs this GZipResponseStream from the supplied response.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this stream and writes the actual response.
|
boolean |
closed()
Determines whether this stream is closed or not.
|
void |
write(byte[] byteArray)
Writes the supplied byteArray to the intermediary output stream.
|
void |
write(byte[] byteArray,
int offset,
int length)
Writes length bytes from the supplied byteArray, with the supplied offset, to the intermediary output stream.
|
void |
write(int b)
Writes the supplied byte to the intermediary output stream.
|
print, print, print, print, print, print, print, println, println, println, println, println, println, println, printlnflushpublic GZipResponseStream(javax.servlet.http.HttpServletResponse response,
int threshold)
throws IOException
response - The response to zip.threshold - The minimum threshold for compression.IOException - When an error occurs during the creation of the output stream.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOException - When this stream can't be closed or when the response could not be written.public void write(int b)
throws IOException
write in class OutputStreamb - The byte to write.IOException - When the byte could not be written.public void write(byte[] byteArray)
throws IOException
write in class OutputStreambyteArray - The byte array to write.IOException - When the supplied byteArray could not be written.public void write(byte[] byteArray,
int offset,
int length)
throws IOException
write in class OutputStreambyteArray - The byte array to write.offset - The offset from the supplied byteArray.length - The number of bytes to write.IOException - When the supplied byteArray could not be written.public boolean closed()
Copyright © 2008–2017. All rights reserved.