Class AppendingTransformer

  • All Implemented Interfaces:
    ResourceTransformer

    public class AppendingTransformer
    extends java.lang.Object
    implements ResourceTransformer
    A resource processor that appends content for a resource, separated by a newline.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.io.ByteArrayOutputStream data  
      (package private) java.lang.String resource  
    • Field Detail

      • resource

        java.lang.String resource
      • data

        java.io.ByteArrayOutputStream data
    • Constructor Detail

      • AppendingTransformer

        public AppendingTransformer()
    • Method Detail

      • 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