@License public final class DataBaseLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SMARTCARDS_XML
The name of the file containing the default smart cards database.
|
static String |
SMARTCARDS_XSD
The name of the smart cards database schema.
|
| Constructor and Description |
|---|
DataBaseLoader() |
| Modifier and Type | Method and Description |
|---|---|
static DataBase |
load()
Loads the default smart cards database from the default XML on the class
path.
|
static DataBase |
load(InputStream input)
Initialises the database by parsing the XML file passed in as an input
stream.
|
static DataBase |
load(String specification)
Loads the smart card database from the URL represented by the given specification.
|
static DataBase |
load(URL url)
Loads a database trying to open the stream from the given URL.
|
public static final String SMARTCARDS_XSD
public static final String DEFAULT_SMARTCARDS_XML
public static DataBase load() throws SmartCardException
SmartCardException - if any error occurs: the method will not return null and will throw instead.public static DataBase load(String specification) throws SmartCardException
specification - an URL specification (including "classpath:" extension); if null, the
default database will be loaded.SmartCardException - if any error occurs: the method will not return null and will throw instead.public static DataBase load(URL url) throws SmartCardException
url - the URL from which the database will be read; if null, the default database
will be loaded.SmartCardException - if any error occurs: the method will not return null and will throw instead.public static DataBase load(InputStream input) throws SmartCardException
input - the database file as a stream; the stream will always be closed
by the time the method returns. If the stream is null, the method
exits immediately without any complaint, in order to make smart cards
loading optional.SmartCardException - if any error occurs: the method will not return null and will throw instead.Copyright © 2012-2014 Andrea Funtò. See here for terms and conditions.