Package writer2latex.api
Interface Config
-
- All Known Implementing Classes:
ConfigBase
,LaTeXConfig
,XhtmlConfig
public interface Config
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ComplexOption
getComplexOption(java.lang.String sName)
Get a complex optionjava.lang.String
getOption(java.lang.String sName)
Get a named optionvoid
read(java.io.File file)
Read a configuration (file based version)void
read(java.io.InputStream is)
Read a configuration (stream based version)void
readDefaultConfig(java.lang.String sName)
Read a default configuration: The available configurations depend on theConverter
implementationvoid
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)
-
-
-
Method Detail
-
readDefaultConfig
void readDefaultConfig(java.lang.String sName) throws java.lang.IllegalArgumentException
Read a default configuration: The available configurations depend on theConverter
implementation- Parameters:
sName
- the name of the configuration- Throws:
java.lang.IllegalArgumentException
- if the configuration does not exist
-
read
void read(java.io.InputStream is) throws java.io.IOException
Read a configuration (stream based version)- Parameters:
is
- theInputStream
to read from- Throws:
java.io.IOException
- if an error occurs reading the stream, or the data is not in the right format
-
read
void read(java.io.File file) throws java.io.IOException
Read a configuration (file based version)- Parameters:
file
- theFile
to read from- Throws:
java.io.IOException
- if the file does not exist, an error occurs reading the file, or the data is not in the right format
-
write
void write(java.io.OutputStream os) throws java.io.IOException
Write the configuration (stream based version)- Parameters:
os
- theOutputStream
to write to- Throws:
java.io.IOException
- if an error occurs writing to the stream
-
write
void write(java.io.File file) throws java.io.IOException
Write the configuration (file based version)- Parameters:
file
- theFile
to write to- Throws:
java.io.IOException
- if an error occurs writing to the file
-
setOption
void setOption(java.lang.String sName, java.lang.String sValue)
Set a name/value option. Options that are not defined by theConverter
implementation as well as null values are silently ignored- Parameters:
sName
- the name of the optionsValue
- the value of the option
-
getOption
java.lang.String getOption(java.lang.String sName)
Get a named option- Parameters:
sName
- the name of the option- Returns:
- the value of the option, or
null
if the option does not exist or the given name is null
-
getComplexOption
ComplexOption getComplexOption(java.lang.String sName)
Get a complex option- Parameters:
sName
- the name of the complex option- Returns:
- the option
-
-