Class FileUtils


  • public class FileUtils
    extends java.lang.Object
    A class containing a number of utilities for dealing with files.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isGzipped​(java.nio.file.Path file)
      Determines if a file is compressed.
      • Methods inherited from class java.lang.Object

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

      • FileUtils

        public FileUtils()
    • Method Detail

      • isGzipped

        public static boolean isGzipped​(java.nio.file.Path file)
                                 throws java.io.IOException
        Determines if a file is compressed. Adapted from stackoverflow answer:
        Parameters:
        file - A file to test.
        Returns:
        true if the file is gzipped, false otherwise.
        Throws:
        java.io.IOException - if the file array couldn't be read
        See Also:
        stackoverflow