Class PEFFileCompare


  • public class PEFFileCompare
    extends Object
    Provides a file comparator for PEF.
    • Constructor Detail

      • PEFFileCompare

        public PEFFileCompare()
        Creates a new pef file comparator.
      • PEFFileCompare

        @Deprecated
        public PEFFileCompare​(NormalizationResource nr)
        Deprecated.
        Creates a new comparator with the specified normalization resource.
        Parameters:
        nr - the normalization resource
      • PEFFileCompare

        public PEFFileCompare​(Supplier<InputStream> nr)
        Creates a new comparator with the specified normalization resource.
        Parameters:
        nr - the normalization resource
      • PEFFileCompare

        public PEFFileCompare​(String path)
        Creates a new comparator with the specified normalization path.
        Parameters:
        path - the path to the normalization resource
      • PEFFileCompare

        public PEFFileCompare​(URL nr)
        Creates a new comparator with the specified normalization url.
        Parameters:
        nr - the url to the normalization resource
    • Method Detail

      • compare

        public boolean compare​(File f1,
                               File f2)
                        throws PEFFileCompareException
        Compares the two files.
        Parameters:
        f1 - the first file
        f2 - the second file
        Returns:
        returns true if the files are equal, false otherwise
        Throws:
        PEFFileCompareException - if comparison fails
      • getPos

        public int getPos()
        Gets the byte position of the first difference.
        Returns:
        returns the position of the first failure