Package com.yworks.yguard
Class ObfuscatorTask.ResourceAdjuster
- java.lang.Object
-
- com.yworks.yguard.ObfuscatorTask.ResourceAdjuster
-
- All Implemented Interfaces:
ResourceHandler
- Enclosing class:
- ObfuscatorTask
protected class ObfuscatorTask.ResourceAdjuster extends java.lang.Object implements ResourceHandler
The type Resource adjuster.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedResourceAdjuster(GuardDB db)Instantiates a new Resource adjuster.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanfilterContent(java.io.InputStream in, java.io.OutputStream out, java.lang.String resourceName)Filter content boolean.protected booleanfilterContentImpl(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.booleanfilterName(java.lang.String inName, java.lang.StringBuffer outName)Filter name boolean.java.lang.StringfilterString(java.lang.String in, java.lang.String resourceName)Filter string string.protected StringReplacernewContentReplacer(java.lang.String separator)
-
-
-
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:ResourceHandlerFilter name boolean.- Specified by:
filterNamein interfaceResourceHandler- Parameters:
inName- the input nameoutName- 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.IOExceptionDescription copied from interface:ResourceHandlerFilter content boolean.- Specified by:
filterContentin interfaceResourceHandler- Parameters:
in- the inout- the outresourceName- 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.IOExceptionPerforms the content filtering for one Adjust section, subclasses may provide custom implementations.- Returns:
trueto 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.IOExceptionDescription copied from interface:ResourceHandlerFilter string string.- Specified by:
filterStringin interfaceResourceHandler- Parameters:
in- the inresourceName- the resource name- Returns:
- the string
- Throws:
java.io.IOException- the io exception
-
newContentReplacer
protected StringReplacer newContentReplacer(java.lang.String separator)
-
-