Class LoaderFromStream
- java.lang.Object
-
- org.apache.commons.digester3.plugins.RuleLoader
-
- org.apache.commons.digester3.plugins.strategies.LoaderFromStream
-
public class LoaderFromStream extends RuleLoader
A rule-finding algorithm which loads an xmlplugins-format file.Note that the "include" feature of xmlrules is not supported.
- Since:
- 1.6
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
input
-
Constructor Summary
Constructors Constructor Description LoaderFromStream(java.io.InputStream s)
The contents of the input stream are loaded into memory, and cached for later use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRules(Digester d, java.lang.String path)
Configures the digester with custom rules for some plugged-in class.
-
-
-
Constructor Detail
-
LoaderFromStream
public LoaderFromStream(java.io.InputStream s) throws java.lang.Exception
The contents of the input stream are loaded into memory, and cached for later use.The caller is responsible for closing the input stream after this method has returned.
- Parameters:
s
- the input stream has to be loaded into memory- Throws:
java.lang.Exception
- if any error occurs while reading the input stream
-
-
Method Detail
-
addRules
public void addRules(Digester d, java.lang.String path) throws PluginException
Configures the digester with custom rules for some plugged-in class.This method is invoked when the start of an xml tag is encountered which maps to a PluginCreateRule. Any rules added here are removed from the digester when the end of that xml tag is encountered.
- Specified by:
addRules
in classRuleLoader
- Parameters:
d
- The gigester has to be configuredpath
- The path where rule has to be bound- Throws:
PluginException
- if any error occurs
-
-