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, println
flush
public 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 Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
- 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 OutputStream
b
- The byte to write.IOException
- When the byte could not be written.public void write(byte[] byteArray) throws IOException
write
in class OutputStream
byteArray
- 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 OutputStream
byteArray
- 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–2018. All rights reserved.