Class IOUtil

java.lang.Object
au.com.acegi.xmlformat.IOUtil

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

    • IOUtil

      private IOUtil()
  • Method Details

    • hash

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

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