public class GzipStream
extends java.io.OutputStream
| Constructor and Description |
|---|
GzipStream()
Create a new Gzip stream.
|
GzipStream(java.io.OutputStream os)
Create a new Gzip stream.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite()
The stream is always writable (?)
|
void |
close()
Close the connection.
|
void |
closeWrite()
Writes a buffer to the underlying stream.
|
void |
flush()
Flushes the underlying stream.
|
void |
free() |
void |
init(java.io.OutputStream os)
Initializes the stream for the next request.
|
boolean |
isData()
Checks if data is written to the stream.
|
void |
reset()
Resets the stream
|
void |
setEnable(boolean enable)
Sets true to enable;
|
void |
setGzip(boolean isGzip)
If true, use gzip.
|
void |
write(byte[] buf,
int offset,
int length)
Writes a buffer to the underlying stream.
|
void |
write(int v)
Writes a byte
|
public GzipStream()
public GzipStream(java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic void setEnable(boolean enable)
public void setGzip(boolean isGzip)
public void init(java.io.OutputStream os)
public void reset()
public boolean isData()
public boolean canWrite()
public void write(int v)
throws java.io.IOException
write in class java.io.OutputStreamv - the value to writejava.io.IOExceptionpublic void write(byte[] buf,
int offset,
int length)
throws java.io.IOException
write in class java.io.OutputStreambuffer - the byte array to write.offset - the offset into the byte array.length - the number of bytes to write.java.io.IOExceptionpublic void closeWrite()
throws java.io.IOException
buffer - the byte array to write.offset - the offset into the byte array.length - the number of bytes to write.isEnd - true when the write is flushing a close.java.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void free()