Enum Class RioCompression
- All Implemented Interfaces:
Serializable, Comparable<RioCompression>, Constable
Compression codecs commonly used around RDF input and output streams.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic List<RioCompression> byte[]compress(byte[] uncompressed) abstract OutputStreamcompress(OutputStream outputStream) abstract InputStreamdecompress(InputStream inputStream) static InputStreamdecompressIfDetected(InputStream inputStream) static InputStreamdecompressIfDetected(InputStream inputStream, String fileName) voidfinish(OutputStream outputStream) static Optional<RioCompression> forContentEncoding(String contentEncoding) static Optional<RioCompression> forFileName(String fileName) booleanstatic RioCompressionReturns the enum constant of this class with the specified name.static RioCompression[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ZSTD
-
GZIP
-
DEFLATE
-
BROTLI
-
-
Field Details
-
DISABLED_ENCODINGS_PROPERTY
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
contentEncoding
-
decompress
- Throws:
IOException
-
compress
- Throws:
IOException
-
compress
- Throws:
IOException
-
finish
- Throws:
IOException
-
isAvailable
public boolean isAvailable() -
decompressIfDetected
- Throws:
IOException
-
decompressIfDetected
public static InputStream decompressIfDetected(InputStream inputStream, String fileName) throws IOException - Throws:
IOException
-
forContentEncoding
-
forFileName
-
availableEncodings
-