Class DeflaterWritableChunkChannel
java.lang.Object
com.e1c.g5.v8.internal.fastzip.chunk.DeflaterWritableChunkChannel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,WritableByteChannel
A channel which compresses data with
Deflater
and writes it to a sequence of chunks provided
by IChunkSupplier
.-
Constructor Summary
ConstructorsConstructorDescriptionDeflaterWritableChunkChannel
(IChunkSupplier chunkSupplier) Creates a new deflater readable chunk channel. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
close()
final boolean
isOpen()
void
setCompressionLevel
(int level) Changes compression level.int
write
(ByteBuffer src)
-
Constructor Details
-
DeflaterWritableChunkChannel
Creates a new deflater readable chunk channel.- Parameters:
chunkSupplier
- the chunk supplier, cannot benull
-
-
Method Details
-
setCompressionLevel
public void setCompressionLevel(int level) Changes compression level.- Parameters:
level
- the new compression level; legal values are 0-9 andDeflater.DEFAULT_COMPRESSION
.- See Also:
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
isOpen
public final boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-