public static enum CompressedSource.CompressionMode extends Enum<CompressedSource.CompressionMode> implements CompressedSource.DecompressingChannelFactory
CompressedSource.| Enum Constant and Description |
|---|
BZIP2
Reads a byte channel assuming it is compressed with bzip2.
|
GZIP
Reads a byte channel assuming it is compressed with gzip.
|
ZIP
Reads a byte channel assuming it is compressed with zip.
|
| Modifier and Type | Method and Description |
|---|---|
abstract ReadableByteChannel |
createDecompressingChannel(ReadableByteChannel channel)
Given a channel, create a channel that decompresses the content read from the channel.
|
abstract boolean |
matches(String fileName)
Returns
true if the given file name implies that the contents are compressed
according to the compression embodied by this factory. |
static CompressedSource.CompressionMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CompressedSource.CompressionMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompressedSource.CompressionMode GZIP
public static final CompressedSource.CompressionMode BZIP2
public static final CompressedSource.CompressionMode ZIP
public static CompressedSource.CompressionMode[] values()
for (CompressedSource.CompressionMode c : CompressedSource.CompressionMode.values()) System.out.println(c);
public static CompressedSource.CompressionMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract boolean matches(String fileName)
true if the given file name implies that the contents are compressed
according to the compression embodied by this factory.public abstract ReadableByteChannel createDecompressingChannel(ReadableByteChannel channel) throws IOException
CompressedSource.DecompressingChannelFactorycreateDecompressingChannel in interface CompressedSource.DecompressingChannelFactoryIOException