Class LongObjectIdTestUtils


  • public class LongObjectIdTestUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static LongObjectId hash​(java.lang.String s)
      Create id as hash of the given string.
      static LongObjectId hash​(java.nio.file.Path file)
      Create id as hash of a file content
      • Methods inherited from class java.lang.Object

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

      • LongObjectIdTestUtils

        public LongObjectIdTestUtils()
    • Method Detail

      • hash

        public static LongObjectId hash​(java.lang.String s)
        Create id as hash of the given string.
        Parameters:
        s - the string to hash
        Returns:
        id calculated by hashing string
      • hash

        public static LongObjectId hash​(java.nio.file.Path file)
                                 throws java.io.FileNotFoundException,
                                        java.io.IOException
        Create id as hash of a file content
        Parameters:
        file - the file to hash
        Returns:
        id calculated by hashing file content
        Throws:
        java.io.FileNotFoundException - if file doesn't exist
        java.io.IOException