Class ObfuscatorTask.ResourceAdjuster

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected GuardDB db
      The Db.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ResourceAdjuster​(GuardDB db)
      Instantiates a new Resource adjuster.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean filterContent​(java.io.InputStream in, java.io.OutputStream out, java.lang.String resourceName)
      Filter content boolean.
      protected boolean filterContentImpl​(java.io.InputStream in, java.io.OutputStream out, java.lang.String resourceName, ObfuscatorTask.AdjustSection as)
      Performs the content filtering for one Adjust section, subclasses may provide custom implementations.
      boolean filterName​(java.lang.String inName, java.lang.StringBuffer outName)
      Filter name boolean.
      java.lang.String filterString​(java.lang.String in, java.lang.String resourceName)
      Filter string string.
      protected StringReplacer newContentReplacer​(java.lang.String separator)  
      • Methods inherited from class java.lang.Object

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

      • db

        protected final GuardDB db
        The Db.
    • Constructor Detail

      • ResourceAdjuster

        protected ResourceAdjuster​(GuardDB db)
        Instantiates a new Resource adjuster.
        Parameters:
        db - the db
    • Method Detail

      • filterName

        public boolean filterName​(java.lang.String inName,
                                  java.lang.StringBuffer outName)
        Description copied from interface: ResourceHandler
        Filter name boolean.
        Specified by:
        filterName in interface ResourceHandler
        Parameters:
        inName - the input name
        outName - the output name
        Returns:
        the boolean
      • filterContent

        public boolean filterContent​(java.io.InputStream in,
                                     java.io.OutputStream out,
                                     java.lang.String resourceName)
                              throws java.io.IOException
        Description copied from interface: ResourceHandler
        Filter content boolean.
        Specified by:
        filterContent in interface ResourceHandler
        Parameters:
        in - the in
        out - the out
        resourceName - the resource name
        Returns:
        the boolean
        Throws:
        java.io.IOException - the io exception
      • filterContentImpl

        protected boolean filterContentImpl​(java.io.InputStream in,
                                            java.io.OutputStream out,
                                            java.lang.String resourceName,
                                            ObfuscatorTask.AdjustSection as)
                                     throws java.io.IOException
        Performs the content filtering for one Adjust section, subclasses may provide custom implementations.
        Returns:
        true to terminate filtering once filtering performed
        Throws:
        java.io.IOException
      • filterString

        public java.lang.String filterString​(java.lang.String in,
                                             java.lang.String resourceName)
                                      throws java.io.IOException
        Description copied from interface: ResourceHandler
        Filter string string.
        Specified by:
        filterString in interface ResourceHandler
        Parameters:
        in - the in
        resourceName - the resource name
        Returns:
        the string
        Throws:
        java.io.IOException - the io exception
      • newContentReplacer

        protected StringReplacer newContentReplacer​(java.lang.String separator)