Package cdc.util.xml
Class AbstractStAXLoader<R>
- java.lang.Object
-
- cdc.util.xml.AbstractStAXLoader<R>
-
- Type Parameters:
R
- The parsing result type.
public abstract class AbstractStAXLoader<R> extends Object
Base class used to load an XML file.Parsing is delegated to a parser that must be provided.
- Author:
- Damien Carbonne
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStAXLoader(BiFunction<XMLStreamReader,String,? extends AbstractStAXParser<R>> ctor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.logging.log4j.Logger
getLogger()
R
load(File file)
R
load(File file, Compressor compressor)
R
load(InputStream is)
R
load(InputStream is, String systemId)
R
load(InputStream is, String systemId, Compressor compressor)
R
load(Reader reader, String systemId)
R
load(String filename)
R
load(String filename, Compressor compressor)
R
load(URL url)
R
load(URL url, Compressor compressor)
-
-
-
Constructor Detail
-
AbstractStAXLoader
protected AbstractStAXLoader(BiFunction<XMLStreamReader,String,? extends AbstractStAXParser<R>> ctor)
-
-
Method Detail
-
getLogger
public final org.apache.logging.log4j.Logger getLogger()
- Returns:
- The logger to use.
-
load
public R load(Reader reader, String systemId) throws IOException
- Throws:
IOException
-
load
public R load(InputStream is) throws IOException
- Throws:
IOException
-
load
public R load(InputStream is, String systemId) throws IOException
- Throws:
IOException
-
load
public R load(InputStream is, String systemId, Compressor compressor) throws IOException
- Throws:
IOException
-
load
public final R load(String filename, Compressor compressor) throws IOException
- Throws:
IOException
-
load
public final R load(String filename) throws IOException
- Throws:
IOException
-
load
public final R load(File file, Compressor compressor) throws IOException
- Throws:
IOException
-
load
public final R load(File file) throws IOException
- Throws:
IOException
-
load
public final R load(URL url, Compressor compressor) throws IOException
- Throws:
IOException
-
load
public final R load(URL url) throws IOException
- Throws:
IOException
-
-