|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Config
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.
| Method Summary | |
|---|---|
java.lang.String |
getOption(java.lang.String sName)
Get a named option |
void |
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 the Converter implementation |
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) |
| Method Detail |
|---|
void readDefaultConfig(java.lang.String sName)
throws java.lang.IllegalArgumentException
Converter implementation
sName - the name of the configuration
java.lang.IllegalArgumentException - if the configuration does not exist
void read(java.io.InputStream is)
throws java.io.IOException
is - the InputStream to read from
java.io.IOException - if an error occurs reading the stream, or the data
is not in the right format
void read(java.io.File file)
throws java.io.IOException
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 format
void write(java.io.OutputStream os)
throws java.io.IOException
os - the OutputStream to write to
java.io.IOException - if an error occurs writing to the stream
void write(java.io.File file)
throws java.io.IOException
file - the File to write to
java.io.IOException - if an error occurs writing to the file
void setOption(java.lang.String sName,
java.lang.String sValue)
Converter implementation as well as null values are
silently ignored
sName - the name of the optionsValue - the value of the optionjava.lang.String getOption(java.lang.String sName)
sName - the name of the option
null if the option does
not exist or the given name is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||