Class Diff


  • public class Diff
    extends java.lang.Object
    Compares the contents of two files, inputStreams or paths.
    • Constructor Summary

      Constructors 
      Constructor Description
      Diff()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.util.List<Delta<java.lang.String>> diff​(java.io.BufferedReader actual, java.io.BufferedReader expected)  
      java.util.List<Delta<java.lang.String>> diff​(java.io.File actual, java.lang.String expected, java.nio.charset.Charset charset)  
      java.util.List<Delta<java.lang.String>> diff​(java.io.File actual, java.nio.charset.Charset actualCharset, java.io.File expected, java.nio.charset.Charset expectedCharset)  
      java.util.List<Delta<java.lang.String>> diff​(java.io.InputStream actual, java.io.InputStream expected)  
      java.util.List<Delta<java.lang.String>> diff​(java.io.InputStream actual, java.lang.String expected)  
      java.util.List<Delta<java.lang.String>> diff​(java.nio.file.Path actual, java.lang.String expected, java.nio.charset.Charset charset)  
      java.util.List<Delta<java.lang.String>> diff​(java.nio.file.Path actual, java.nio.charset.Charset actualCharset, java.nio.file.Path expected, java.nio.charset.Charset expectedCharset)  
      private java.util.List<java.lang.String> linesFromBufferedReader​(java.io.BufferedReader reader)  
      private java.io.BufferedReader readerFor​(java.io.InputStream stream)  
      private java.io.BufferedReader readerFor​(java.lang.String string)  
      • Methods inherited from class java.lang.Object

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

      • Diff

        public Diff()
    • Method Detail

      • diff

        public java.util.List<Delta<java.lang.String>> diff​(java.io.InputStream actual,
                                                            java.io.InputStream expected)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • diff

        public java.util.List<Delta<java.lang.String>> diff​(java.io.InputStream actual,
                                                            java.lang.String expected)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • diff

        public java.util.List<Delta<java.lang.String>> diff​(java.io.File actual,
                                                            java.nio.charset.Charset actualCharset,
                                                            java.io.File expected,
                                                            java.nio.charset.Charset expectedCharset)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • diff

        public java.util.List<Delta<java.lang.String>> diff​(java.nio.file.Path actual,
                                                            java.nio.charset.Charset actualCharset,
                                                            java.nio.file.Path expected,
                                                            java.nio.charset.Charset expectedCharset)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • diff

        public java.util.List<Delta<java.lang.String>> diff​(java.io.File actual,
                                                            java.lang.String expected,
                                                            java.nio.charset.Charset charset)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • diff

        public java.util.List<Delta<java.lang.String>> diff​(java.nio.file.Path actual,
                                                            java.lang.String expected,
                                                            java.nio.charset.Charset charset)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • readerFor

        private java.io.BufferedReader readerFor​(java.io.InputStream stream)
      • readerFor

        private java.io.BufferedReader readerFor​(java.lang.String string)
      • diff

        private java.util.List<Delta<java.lang.String>> diff​(java.io.BufferedReader actual,
                                                             java.io.BufferedReader expected)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • linesFromBufferedReader

        private java.util.List<java.lang.String> linesFromBufferedReader​(java.io.BufferedReader reader)
                                                                  throws java.io.IOException
        Throws:
        java.io.IOException