|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwriter2latex.base.ConfigBase
public abstract class ConfigBase
Field Summary | |
---|---|
protected Option[] |
options
|
Constructor Summary | |
---|---|
ConfigBase()
|
Method Summary | |
---|---|
protected abstract java.lang.String |
getDefaultConfigPath()
|
java.lang.String |
getOption(java.lang.String sName)
Get a named option |
protected abstract int |
getOptionCount()
|
void |
read(java.io.File file)
Read a configuration (file based version) |
void |
read(java.io.InputStream is)
Read configuration from a specified input stream |
void |
readDefaultConfig(java.lang.String sName)
Read a default configuration: The available configurations depend on the Converter implementation |
protected abstract void |
readInner(org.w3c.dom.Element elm)
Read configuration information from an xml element. |
void |
setOption(java.lang.String sName,
java.lang.String sValue)
Set a name/value option. |
void |
write(java.io.File file)
Write the configuration (file based version) |
void |
write(java.io.OutputStream os)
Write the configuration (stream based version) |
protected abstract void |
writeInner(org.w3c.dom.Document dom)
Write configuration information to an xml document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Option[] options
Constructor Detail |
---|
public ConfigBase()
Method Detail |
---|
protected abstract int getOptionCount()
protected abstract java.lang.String getDefaultConfigPath()
public void setOption(java.lang.String sName, java.lang.String sValue)
Config
Converter
implementation as well as null values are
silently ignored
setOption
in interface Config
sName
- the name of the optionsValue
- the value of the optionpublic java.lang.String getOption(java.lang.String sName)
Config
getOption
in interface Config
sName
- the name of the option
null
if the option does
not exist or the given name is nullpublic void readDefaultConfig(java.lang.String sName) throws java.lang.IllegalArgumentException
Config
Converter
implementation
readDefaultConfig
in interface Config
sName
- the name of the configuration
java.lang.IllegalArgumentException
- if the configuration does not existpublic void read(java.io.InputStream is) throws java.io.IOException
Read configuration from a specified input stream
read
in interface Config
is
- the input stream to read the configuration from
java.io.IOException
- if an error occurs reading the stream, or the data
is not in the right formatpublic void read(java.io.File file) throws java.io.IOException
Config
read
in interface Config
file
- the File
to read from
java.io.IOException
- if the file does not exist, an error occurs reading
the file, or the data is not in the right formatprotected abstract void readInner(org.w3c.dom.Element elm)
public void write(java.io.OutputStream os) throws java.io.IOException
Config
write
in interface Config
os
- the OutputStream
to write to
java.io.IOException
- if an error occurs writing to the streampublic void write(java.io.File file) throws java.io.IOException
Config
write
in interface Config
file
- the File
to write to
java.io.IOException
- if an error occurs writing to the fileprotected abstract void writeInner(org.w3c.dom.Document dom)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |