Class ResourceBundleAppendingTransformer

  • All Implemented Interfaces:
    ResourceTransformer

    public class ResourceBundleAppendingTransformer
    extends java.lang.Object
    implements ResourceTransformer
    An appending transformer for resource bundles
    Since:
    3.0.0
    • Field Detail

      • dataMap

        private java.util.Map<java.lang.String,​java.io.ByteArrayOutputStream> dataMap
      • resourceBundlePattern

        private java.util.regex.Pattern resourceBundlePattern
    • Constructor Detail

      • ResourceBundleAppendingTransformer

        public ResourceBundleAppendingTransformer()
    • Method Detail

      • setBasename

        public void setBasename​(java.lang.String basename)
        the base name of the resource bundle, a fully qualified class name
      • processResource

        public void processResource​(java.lang.String resource,
                                    java.io.InputStream is,
                                    java.util.List<Relocator> relocators)
                             throws java.io.IOException
        Description copied from interface: ResourceTransformer
        Transform an individual resource
        Specified by:
        processResource in interface ResourceTransformer
        Parameters:
        resource - The resoure name
        is - An input stream for the resource, the implementation should *not* close this stream
        relocators - A list of relocators
        Throws:
        java.io.IOException - When the IO blows up
      • modifyOutputStream

        public void modifyOutputStream​(java.util.jar.JarOutputStream jos)
                                throws java.io.IOException
        Specified by:
        modifyOutputStream in interface ResourceTransformer
        Throws:
        java.io.IOException