Class GZipFiles


  • public class GZipFiles
    extends java.lang.Object
    Helper 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 boolean isGzip​(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 to Files.lines(java.nio.file.Path).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GZipFiles

        public GZipFiles()
    • 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 to Files.lines(java.nio.file.Path).
        Parameters:
        path - The path to the gzipped file.
        Returns:
        stream with lines.