类 GzipSink
java.lang.Object
com.lark.oapi.okio.GzipSink
- 所有已实现的接口:
Sink,Closeable,Flushable,AutoCloseable
A sink that uses GZIP to compress written data
to another sink.
Sync flush
Aggressive flushing of this stream may result in reduced compression. Each call toflush()
immediately compresses all currently-buffered data; this early compression may be less effective
than compression performed without flushing.
This is equivalent to using Deflater with the sync flush option.
This class does not offer any partial flush mechanism. For best performance, only call flush() when application behavior requires it.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclose()Pushes all buffered bytes to their final destination and releases the resources held by this sink.final Deflaterdeflater()Returns theDeflater.voidflush()Pushes all buffered bytes to their final destination.timeout()Returns the timeout for this sink.voidRemovesbyteCountbytes fromsourceand appends them to this.
-
构造器详细资料
-
GzipSink
-
-
方法详细资料
-
write
从接口复制的说明:SinkRemovesbyteCountbytes fromsourceand appends them to this.- 指定者:
write在接口中Sink- 抛出:
IOException
-
flush
从接口复制的说明:SinkPushes all buffered bytes to their final destination.- 指定者:
flush在接口中Flushable- 指定者:
flush在接口中Sink- 抛出:
IOException
-
timeout
从接口复制的说明:SinkReturns the timeout for this sink. -
close
从接口复制的说明:SinkPushes all buffered bytes to their final destination and releases the resources held by this sink. It is an error to write a closed sink. It is safe to close a sink more than once.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 指定者:
close在接口中Sink- 抛出:
IOException
-
deflater
Returns theDeflater. Use it to access stats, dictionary, compression level, etc.
-