Class DefaultSVNGNUDiffGenerator

    • Field Detail

      • myHeader

        private java.lang.String myHeader
      • myIsHeaderWritten

        private boolean myIsHeaderWritten
      • myOriginalRoot

        private FSRoot myOriginalRoot
      • myOriginalPath

        private java.lang.String myOriginalPath
      • myNewRoot

        private FSRoot myNewRoot
      • myNewPath

        private java.lang.String myNewPath
      • myIsDiffWritten

        private boolean myIsDiffWritten
    • Constructor Detail

      • DefaultSVNGNUDiffGenerator

        public DefaultSVNGNUDiffGenerator()
    • Method Detail

      • displayHeader

        public void displayHeader​(int type,
                                  java.lang.String path,
                                  java.lang.String copyFromPath,
                                  long copyFromRevision,
                                  java.io.OutputStream result)
                           throws SVNException
        Description copied from interface: ISVNGNUDiffGenerator
        Informs this diff generator about a change to a path.
        Specified by:
        displayHeader in interface ISVNGNUDiffGenerator
        Parameters:
        type - one of static fields of this interface
        path - a changed path
        copyFromPath - a copy-from source path if path is the result of a copy
        copyFromRevision - a copy-from source revision if path is the result of a copy
        result - an output stream where a header is to be written
        Throws:
        SVNException
      • displayFileDiff

        public void displayFileDiff​(java.lang.String path,
                                    java.io.File file1,
                                    java.io.File file2,
                                    java.lang.String rev1,
                                    java.lang.String rev2,
                                    java.lang.String mimeType1,
                                    java.lang.String mimeType2,
                                    java.io.OutputStream result)
                             throws SVNException
        Description copied from class: DefaultSVNDiffGenerator
        Writes the difference between file1 and file2 as they are seen in rev1 and rev2 to result.
        Specified by:
        displayFileDiff in interface ISVNDiffGenerator
        Overrides:
        displayFileDiff in class DefaultSVNDiffGenerator
        Parameters:
        path - a file path on which the differences are generated and written to the output
        file1 - a file with old contents
        file2 - a file with new contents
        rev1 - the first diff revision of file1
        rev2 - the second diff revision of file2
        mimeType1 - the MIME-type of file1
        mimeType2 - the MIME-type of file2
        result - the target OutputStream where the differences will be written to
        Throws:
        SVNException - in the following cases:
      • setHeaderWritten

        public void setHeaderWritten​(boolean written)
      • displayHeader

        protected boolean displayHeader​(java.io.OutputStream os,
                                        java.lang.String path,
                                        boolean deleted)
                                 throws java.io.IOException
        Overrides:
        displayHeader in class DefaultSVNDiffGenerator
        Throws:
        java.io.IOException
      • displayBinary

        protected void displayBinary​(java.io.OutputStream os,
                                     java.lang.String mimeType1,
                                     java.lang.String mimeType2)
                              throws java.io.IOException
        Overrides:
        displayBinary in class DefaultSVNDiffGenerator
        Throws:
        java.io.IOException
      • displayHeaderFields

        protected void displayHeaderFields​(java.io.OutputStream os,
                                           java.lang.String label1,
                                           java.lang.String label2)
                                    throws java.io.IOException
        Overrides:
        displayHeaderFields in class DefaultSVNDiffGenerator
        Throws:
        java.io.IOException
      • setOriginalFile

        protected void setOriginalFile​(FSRoot originalRoot,
                                       java.lang.String originalPath)
      • setNewFile

        protected void setNewFile​(FSRoot newRoot,
                                  java.lang.String newPath)
      • setDiffWritten

        public void setDiffWritten​(boolean b)
      • isDiffWritten

        public boolean isDiffWritten()