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 voidclose()final booleanisOpen()voidsetCompressionLevel(int level) Changes compression level.intwrite(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:
writein interfaceWritableByteChannel- Throws:
IOException
-
isOpen
public final boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-