Class StaticWeaveJAROutputHandler


  • public class StaticWeaveJAROutputHandler
    extends AbstractStaticWeaveOutputHandler
    The class provides a set of methods to pack passing in entries into the sepcified archive file. the class JAR output.
    • Constructor Summary

      Constructors 
      Constructor Description
      StaticWeaveJAROutputHandler​(java.util.jar.JarOutputStream outputStreamHolder)
      Construct an instance of StaticWeaveJAROutputHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDirEntry​(java.lang.String dirPath)
      Add directory entry into outputstream.
      void addEntry​(java.io.InputStream jis, java.util.jar.JarEntry entry)
      Write entry into target, this method usually copy original class into target.
      void addEntry​(java.util.jar.JarEntry targetEntry, byte[] entryBytes)
      Write entry bytes into target, this method is usually called if class has been tranformed
      • Methods inherited from class java.lang.Object

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

      • StaticWeaveJAROutputHandler

        public StaticWeaveJAROutputHandler​(java.util.jar.JarOutputStream outputStreamHolder)
        Construct an instance of StaticWeaveJAROutputHandler
        Parameters:
        outputStreamHolder -
    • Method Detail

      • addDirEntry

        public void addDirEntry​(java.lang.String dirPath)
                         throws java.io.IOException
        Add directory entry into outputstream.
        Specified by:
        addDirEntry in class AbstractStaticWeaveOutputHandler
        Parameters:
        dirPath -
        Throws:
        java.io.IOException
      • addEntry

        public void addEntry​(java.util.jar.JarEntry targetEntry,
                             byte[] entryBytes)
                      throws java.io.IOException
        Write entry bytes into target, this method is usually called if class has been tranformed
        Specified by:
        addEntry in class AbstractStaticWeaveOutputHandler
        Parameters:
        targetEntry -
        entryBytes -
        Throws:
        java.io.IOException
      • addEntry

        public void addEntry​(java.io.InputStream jis,
                             java.util.jar.JarEntry entry)
                      throws java.io.IOException,
                             java.net.URISyntaxException
        Write entry into target, this method usually copy original class into target.
        Specified by:
        addEntry in class AbstractStaticWeaveOutputHandler
        Parameters:
        jis -
        entry -
        Throws:
        java.io.IOException
        java.net.URISyntaxException