Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.io
Enum CompressedSource.CompressionMode
- java.lang.Object
-
- java.lang.Enum<CompressedSource.CompressionMode>
-
- com.google.cloud.dataflow.sdk.io.CompressedSource.CompressionMode
-
- All Implemented Interfaces:
- CompressedSource.DecompressingChannelFactory, Serializable, Comparable<CompressedSource.CompressionMode>
- Enclosing class:
- CompressedSource<T>
public static enum CompressedSource.CompressionMode extends Enum<CompressedSource.CompressionMode> implements CompressedSource.DecompressingChannelFactory
Default compression types supported by theCompressedSource
.
-
-
Enum Constant Summary
Enum Constants 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.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 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)
Returnstrue
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.
-
-
-
Enum Constant Detail
-
GZIP
public static final CompressedSource.CompressionMode GZIP
Reads a byte channel assuming it is compressed with gzip.
-
BZIP2
public static final CompressedSource.CompressionMode BZIP2
Reads a byte channel assuming it is compressed with bzip2.
-
-
Method Detail
-
values
public static CompressedSource.CompressionMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CompressedSource.CompressionMode c : CompressedSource.CompressionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompressedSource.CompressionMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
matches
public abstract boolean matches(String fileName)
Returnstrue
if the given file name implies that the contents are compressed according to the compression embodied by this factory.
-
createDecompressingChannel
public abstract ReadableByteChannel createDecompressingChannel(ReadableByteChannel channel) throws IOException
Description copied from interface:CompressedSource.DecompressingChannelFactory
Given a channel, create a channel that decompresses the content read from the channel.- Specified by:
createDecompressingChannel
in interfaceCompressedSource.DecompressingChannelFactory
- Throws:
IOException
-
-