Package org.apache.pulsar.io.file.utils
Class GZipFiles
- java.lang.Object
-
- org.apache.pulsar.io.file.utils.GZipFiles
-
public class GZipFiles extends java.lang.ObjectHelper class that provides helper methods for working with gzip-formatted files.
-
-
Constructor Summary
Constructors Constructor Description GZipFiles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisGzip(java.io.File f)Returns true if the given file is a gzip file.static java.util.stream.Stream<java.lang.String>lines(java.nio.file.Path path)Get a lazily loaded stream of lines from a gzipped file, similar toFiles.lines(java.nio.file.Path).
-
-
-
Method Detail
-
isGzip
public static boolean isGzip(java.io.File f)
Returns true if the given file is a gzip file.
-
lines
public static java.util.stream.Stream<java.lang.String> lines(java.nio.file.Path path)
Get a lazily loaded stream of lines from a gzipped file, similar toFiles.lines(java.nio.file.Path).- Parameters:
path- The path to the gzipped file.- Returns:
- stream with lines.
-
-