Class ManifestConverter

  • All Implemented Interfaces:
    Converter

    public class ManifestConverter
    extends java.lang.Object
    implements Converter
    Updates Manifests.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Logger logger  
      private static StringManager sm  
    • Constructor Summary

      Constructors 
      Constructor Description
      ManifestConverter()
      Manifest converter constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accepts​(java.lang.String filename)
      Check if the file can be processed by this converter.
      boolean convert​(java.lang.String path, java.io.InputStream src, java.io.OutputStream dest, EESpecProfile profile)
      Copies the source to the destination, converting it if necessary, according to the requirements of the given profile.
      private boolean isCryptoSignatureEntry​(java.util.jar.Attributes attributes)  
      private void removeSignatures​(java.util.jar.Manifest manifest)  
      private java.lang.String replaceVersion​(java.lang.String entryValue)  
      private boolean updateValues​(java.util.jar.Attributes attributes, EESpecProfile profile)  
      private boolean updateValues​(java.util.jar.Manifest manifest, EESpecProfile profile)  
      • Methods inherited from class java.lang.Object

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

      • logger

        private static final java.util.logging.Logger logger
    • Constructor Detail

      • ManifestConverter

        public ManifestConverter()
        Manifest converter constructor.
    • Method Detail

      • accepts

        public boolean accepts​(java.lang.String filename)
        Description copied from interface: Converter
        Check if the file can be processed by this converter.
        Specified by:
        accepts in interface Converter
        Parameters:
        filename - the file name
        Returns:
        true if the converter will process this file
      • convert

        public boolean convert​(java.lang.String path,
                               java.io.InputStream src,
                               java.io.OutputStream dest,
                               EESpecProfile profile)
                        throws java.io.IOException
        Description copied from interface: Converter
        Copies the source to the destination, converting it if necessary, according to the requirements of the given profile.
        Specified by:
        convert in interface Converter
        Parameters:
        path - The path to the data being converted
        src - The source data to convert
        dest - The destination to write the converted data
        profile - The profile that defines the conversion required
        Returns:
        true if the converter made a conversion to the file
        Throws:
        java.io.IOException - If the conversion fails
      • removeSignatures

        private void removeSignatures​(java.util.jar.Manifest manifest)
      • isCryptoSignatureEntry

        private boolean isCryptoSignatureEntry​(java.util.jar.Attributes attributes)
      • updateValues

        private boolean updateValues​(java.util.jar.Manifest manifest,
                                     EESpecProfile profile)
      • updateValues

        private boolean updateValues​(java.util.jar.Attributes attributes,
                                     EESpecProfile profile)
      • replaceVersion

        private java.lang.String replaceVersion​(java.lang.String entryValue)