public static enum CompressedSource.CompressionMode extends java.lang.Enum<CompressedSource.CompressionMode> implements CompressedSource.DecompressingChannelFactory
CompressedSource
.Enum Constant and Description |
---|
BZIP2
Reads a byte channel assuming it is compressed with bzip2.
|
DEFLATE
Reads a byte channel assuming it is compressed with deflate.
|
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 java.nio.channels.ReadableByteChannel |
createDecompressingChannel(java.nio.channels.ReadableByteChannel channel)
Given a channel, create a channel that decompresses the content read from the channel.
|
abstract boolean |
matches(java.lang.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(java.lang.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 final CompressedSource.CompressionMode DEFLATE
public static CompressedSource.CompressionMode[] values()
for (CompressedSource.CompressionMode c : CompressedSource.CompressionMode.values()) System.out.println(c);
public static CompressedSource.CompressionMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract boolean matches(java.lang.String fileName)
true
if the given file name implies that the contents are compressed
according to the compression embodied by this factory.public abstract java.nio.channels.ReadableByteChannel createDecompressingChannel(java.nio.channels.ReadableByteChannel channel) throws java.io.IOException
CompressedSource.DecompressingChannelFactory
createDecompressingChannel
in interface CompressedSource.DecompressingChannelFactory
java.io.IOException