writer2latex.api
Interface Config
- ConfigBase, LaTeXConfig, XhtmlConfig
This is an interface for configuration of a
Converter
.
A configuration always supports simple name/value options.
In addition, you can read and write configurations using streams
or abstract file names. The format depends on the
Converter
implementation, cf. the user's manual.
String | getOption(String sName) - Get a named option
|
void | read(File file) - Read a configuration (file based version)
|
void | read(InputStream is) - Read a configuration (stream based version)
|
void | readDefaultConfig(String sName) - Read a default configuration: The available configurations depend on the
Converter implementation
|
void | setOption(String sName, String sValue) - Set a name/value option.
|
void | write(File file) - Write the configuration (file based version)
|
void | write(OutputStream os) - Write the configuration (stream based version)
|
getOption
public String getOption(String sName)
Get a named option
sName
- the name of the option
- the value of the option, or
null
if the option does
not exist or the given name is null
read
public void read(File file)
throws IOException
Read a configuration (file based version)
file
- the File
to read from
read
public void read(InputStream is)
throws IOException
Read a configuration (stream based version)
is
- the InputStream
to read from
readDefaultConfig
public void readDefaultConfig(String sName)
throws IllegalArgumentException
Read a default configuration: The available configurations depend on the
Converter
implementation
sName
- the name of the configuration
setOption
public void setOption(String sName,
String sValue)
Set a name/value option. Options that are not defined by the
Converter
implementation as well as null values are
silently ignored
sName
- the name of the optionsValue
- the value of the option
write
public void write(File file)
throws IOException
Write the configuration (file based version)
file
- the File
to write to
write
public void write(OutputStream os)
throws IOException
Write the configuration (stream based version)
os
- the OutputStream
to write to