Class IOUtil


  • final class IOUtil
    extends java.lang.Object
    Utility methods for dealing with I/O resources.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private IOUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static long hash​(java.io.File file)
      Returns a CRC32 of the given file.
      (package private) static long hash​(java.io.InputStream in)
      Returns a CRC32 of the provided input stream.
      • Methods inherited from class java.lang.Object

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

      • IOUtil

        private IOUtil()
    • Method Detail

      • hash

        static long hash​(java.io.InputStream in)
                  throws java.io.IOException
        Returns a CRC32 of the provided input stream.
        Parameters:
        in - to CRC32
        Returns:
        the CRC32 value
        Throws:
        java.io.IOException - if unable to read the input stream
      • hash

        static long hash​(java.io.File file)
                  throws java.io.IOException
        Returns a CRC32 of the given file.
        Parameters:
        file - to CRC32
        Returns:
        the CRC32 value
        Throws:
        java.io.IOException - if unable to read the file