Package org.apache.pulsar.io.file.utils
Class ZipFiles
- java.lang.Object
-
- org.apache.pulsar.io.file.utils.ZipFiles
-
public class ZipFiles extends java.lang.ObjectHelper class that provides helper methods for working with zip-formatted files.
-
-
Constructor Summary
Constructors Constructor Description ZipFiles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisZip(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
-
isZip
public static boolean isZip(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 zipped file.- Returns:
- stream with lines.
-
-