public abstract class AbstractUnsupportedCompressionMethod extends Object implements ZipEntryCompressionMethod
Constructor and Description |
---|
AbstractUnsupportedCompressionMethod() |
Modifier and Type | Method and Description |
---|---|
InputStream |
createInputStream(InputStream is,
long compressedSize,
long uncompressedSize)
This method always throws an
UnsupportedCompressionMethodException . |
OutputStream |
createOutputStream(OutputStream os)
This method always throws an
UnsupportedCompressionMethodException . |
org.entityfs.RandomAccess |
createRandomAccess(org.entityfs.RandomAccess ra,
long compressedSize,
long uncompressedSize)
This method always throws an
UnsupportedCompressionMethodException . |
ZipEntryCompressionMethod |
createWithCompressionLevel(CompressionLevel level)
Create a new
ZipEntryCompressionMethod object that will have the
supplied compression level. |
boolean |
isRandomAccessSupported()
This method always returns
false |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCode, getName, getVersionNeededToExtract
public AbstractUnsupportedCompressionMethod()
public final InputStream createInputStream(InputStream is, long compressedSize, long uncompressedSize) throws UnsupportedCompressionMethodException
UnsupportedCompressionMethodException
.createInputStream
in interface ZipEntryCompressionMethod
is
- An open InputStream
on the compressed file data.compressedSize
- The total size of the compressed data.uncompressedSize
- The total size of the uncompressed data.InputStream
containing uncompressed file data.UnsupportedCompressionMethodException
- Always.public final OutputStream createOutputStream(OutputStream os) throws UnsupportedCompressionMethodException
UnsupportedCompressionMethodException
.createOutputStream
in interface ZipEntryCompressionMethod
os
- The wrapped output stream.UnsupportedCompressionMethodException
- Always.public final org.entityfs.RandomAccess createRandomAccess(org.entityfs.RandomAccess ra, long compressedSize, long uncompressedSize) throws UnsupportedCompressionMethodException
UnsupportedCompressionMethodException
.createRandomAccess
in interface ZipEntryCompressionMethod
ra
- An open random access object on the file entry's data.compressedSize
- The total size of the compressed data.uncompressedSize
- The total size of the uncompressed data.RandomAccess
that can be used to read
uncompressed data.UnsupportedCompressionMethodException
- Always.public final boolean isRandomAccessSupported()
false
isRandomAccessSupported
in interface ZipEntryCompressionMethod
false
, always.public final ZipEntryCompressionMethod createWithCompressionLevel(CompressionLevel level)
ZipEntryCompressionMethod
ZipEntryCompressionMethod
object that will have the
supplied compression level.
The reason for this method is that it makes it easier to set a custom compression level for a compression method, without having to create a new compression method object from scratch manually.
createWithCompressionLevel
in interface ZipEntryCompressionMethod
level
- The compression level.this