Class JNLPMatcher
java.lang.Object
net.sourceforge.jnlp.JNLPMatcher
To compare launching JNLP file with signed APPLICATION.JNLP or
APPLICATION_TEMPLATE.jnlp.
Used by net.sourceforge.jnlp.runtime.JNLPCLassLoader
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJNLPMatcher(InputStream appTemplate, InputStream launchJNLP, boolean isTemplate, ParserSettings p) Public constructor -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcloseInputStream(InputStream stream) Closes an input streamprivate voidcloseOutputStream(OutputStream stream) Closes an output streambooleanisMatch()Compares both JNLP filesprivate booleanmatchAttributes(XmlNode templateNode, XmlNode launchNode) Compares attributes of twoNodesregardless of orderprivate booleanmatchNodes(XmlNode appTemplate, XmlNode launchJNLP) Compares two Nodes regardless of the order of their children/attributes
-
Field Details
-
LOG
-
appTemplateNode
-
launchJNLPNode
-
isTemplate
private final boolean isTemplate
-
-
Constructor Details
-
JNLPMatcher
public JNLPMatcher(InputStream appTemplate, InputStream launchJNLP, boolean isTemplate, ParserSettings p) throws JNLPMatcherException Public constructor- Parameters:
appTemplate- the reader stream of the signed APPLICATION.jnlp or APPLICATION_TEMPLATE.jnlplaunchJNLP- the reader stream of the launching JNLP fileisTemplate- a boolean that specifies if appTemplateFile is a templatep- settings of parser- Throws:
JNLPMatcherException- if IOException, XMLParseException is thrown during parsing; Or launchJNLP/appTemplate is null
-
-
Method Details
-
isMatch
public boolean isMatch()Compares both JNLP files- Returns:
- true if both JNLP files are 'matched', otherwise false
-
matchNodes
Compares two Nodes regardless of the order of their children/attributes- Parameters:
appTemplate- signed application or template's NodelaunchJNLP- launching JNLP file's Node- Returns:
- true if both Nodes are 'matched', otherwise false
-
matchAttributes
Compares attributes of twoNodesregardless of order -
closeInputStream
Closes an input stream- Parameters:
stream- The input stream that will be closed
-
closeOutputStream
Closes an output stream- Parameters:
stream- The output stream that will be closed
-