Class JarDiffMerger


  • public class JarDiffMerger
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  JarDiffMerger.MovedJar  
    • Constructor Summary

      Constructors 
      Constructor Description
      JarDiffMerger()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static boolean containsEntryWithSameName​(java.util.Collection<java.util.jar.JarEntry> collection, java.lang.String name)  
      private static boolean containsOldName​(java.util.Collection<JarDiffMerger.MovedJar> collection, java.lang.String oldName)  
      private static java.util.List<java.lang.String> getIndexFileLines​(java.util.jar.JarFile jarDiff)  
      private static java.util.Set<JarDiffMerger.MovedJar> getMovedContent​(java.util.jar.JarFile jarDiff)  
      private static java.util.Set<java.util.jar.JarEntry> getNewContent​(java.util.jar.JarFile jarDiff)  
      private static java.util.Set<java.lang.String> getRemovedContent​(java.util.jar.JarFile jarDiff)  
      static void merge​(java.util.jar.JarFile oldJar, java.util.jar.JarFile jarDiff, java.util.jar.JarOutputStream outputStream)  
      private static void writeEntry​(java.io.InputStream inputStream, java.util.jar.JarOutputStream jarOutputStream, java.lang.String entryName)  
      • Methods inherited from class java.lang.Object

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

      • LOG

        private static final Logger LOG
      • MOVED_PATH_PATTERN

        private static final java.util.regex.Pattern MOVED_PATH_PATTERN
      • ESCAPED_WHITESPACE_PATTERN

        private static final java.lang.String ESCAPED_WHITESPACE_PATTERN
      • VERSION_INFORMATION

        private static final java.lang.String VERSION_INFORMATION
        See Also:
        Constant Field Values
    • Constructor Detail

      • JarDiffMerger

        public JarDiffMerger()
    • Method Detail

      • merge

        public static void merge​(java.util.jar.JarFile oldJar,
                                 java.util.jar.JarFile jarDiff,
                                 java.util.jar.JarOutputStream outputStream)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • containsEntryWithSameName

        private static boolean containsEntryWithSameName​(java.util.Collection<java.util.jar.JarEntry> collection,
                                                         java.lang.String name)
      • containsOldName

        private static boolean containsOldName​(java.util.Collection<JarDiffMerger.MovedJar> collection,
                                               java.lang.String oldName)
      • getNewContent

        private static java.util.Set<java.util.jar.JarEntry> getNewContent​(java.util.jar.JarFile jarDiff)
      • getIndexFileLines

        private static java.util.List<java.lang.String> getIndexFileLines​(java.util.jar.JarFile jarDiff)
                                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getRemovedContent

        private static java.util.Set<java.lang.String> getRemovedContent​(java.util.jar.JarFile jarDiff)
                                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getMovedContent

        private static java.util.Set<JarDiffMerger.MovedJar> getMovedContent​(java.util.jar.JarFile jarDiff)
                                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • writeEntry

        private static void writeEntry​(java.io.InputStream inputStream,
                                       java.util.jar.JarOutputStream jarOutputStream,
                                       java.lang.String entryName)
                                throws java.io.IOException
        Throws:
        java.io.IOException