org.apache.commons.digester.plugins.strategies

Class 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

private byte[]
input
private FromXmlRuleSet
ruleSet

Constructor Summary

LoaderFromStream(InputStream s)
See load(InputStream).

Method Summary

void
addRules(Digester d, String path)
Add the rules previously loaded from the input stream into the specified digester.
private void
load(InputStream s)
The contents of the input stream are loaded into memory, and cached for later use.

Methods inherited from class org.apache.commons.digester.plugins.RuleLoader

addRules

Field Details

input

private byte[] input

ruleSet

private FromXmlRuleSet ruleSet

Constructor Details

LoaderFromStream

public LoaderFromStream(InputStream s)
            throws Exception

Method Details

addRules

public void addRules(Digester d,
                     String path)
            throws PluginException
Add the rules previously loaded from the input stream into the specified digester.
Overrides:
addRules in interface RuleLoader

load

private void load(InputStream s)
            throws IOException
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.


Copyright 2001-2005 The Apache Software Foundation.