Package org.harctoolbox.jirc
Class ConfigFile
java.lang.Object
org.harctoolbox.jirc.ConfigFile
This class parses the Lircd configuration file(s).
Its preferred public members are the static functions parseConfig,
returning a
RemoteSet
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static org.harctoolbox.girr.RemoteSet
parseConfig
(File filename, String charsetName, boolean rejectLircCode, String creatingUser) Parses a Lirc configuration file, and returns aRemoteSet
.static org.harctoolbox.girr.RemoteSet
parseConfig
(Reader reader, String source, boolean rejectLircCode, String creatingUser) Parses aReader
for one or many Lirc configuration "file(s)", and returns aRemoteSet
.static Collection<IrRemote>
readConfig
(File filename, String charsetName, boolean rejectLircCode) Reads the file given as first argument and delivers a Collection ofIrRemote
's.static Collection<IrRemote>
readConfig
(Reader reader, String source, boolean rejectLircCode)
-
Field Details
-
defaultCharsetName
Default character set input files.- See Also:
-
-
Method Details
-
readConfig
public static Collection<IrRemote> readConfig(File filename, String charsetName, boolean rejectLircCode) throws IOException Reads the file given as first argument and delivers a Collection ofIrRemote
's.- Parameters:
filename
- lirc.conf filecharsetName
- Name of the Charset used for reading.rejectLircCode
- if true, so-called LircCode remotes (without timing information, depending on special drivers), will be accepted.- Returns:
- Collection of IrRemote's.
- Throws:
IOException
- Misc IO problem
-
readConfig
public static Collection<IrRemote> readConfig(Reader reader, String source, boolean rejectLircCode) throws IOException - Throws:
IOException
-
parseConfig
public static org.harctoolbox.girr.RemoteSet parseConfig(File filename, String charsetName, boolean rejectLircCode, String creatingUser) throws IOException Parses a Lirc configuration file, and returns aRemoteSet
.- Parameters:
filename
- Lirc configuration filecharsetName
- Name of thecharacter set
for reading, e.g. URF-8, ISO-8859-1, WINDOWS-1252.rejectLircCode
- If true, so-called Lirccode files are processed (but will be of limited use anyhow).creatingUser
- Name of the creating user; for documentation purposes.- Returns:
- RemoteSet as per Girr specification.
- Throws:
IOException
- Misc IO errors.
-
parseConfig
public static org.harctoolbox.girr.RemoteSet parseConfig(Reader reader, String source, boolean rejectLircCode, String creatingUser) throws IOException Parses aReader
for one or many Lirc configuration "file(s)", and returns aRemoteSet
.- Parameters:
reader
- Reader delivering a Lirc configuration file.source
- String containing the source of the informatsion, for documentation purposes.rejectLircCode
- If true, so-called Lirccode files are rejected, otherwise they are processed (but will be of limited use anyhow)creatingUser
- Name of the creating user; for documentation purposes.- Returns:
- RemoteSet as per Girr specification.
- Throws:
IOException
- Misc IO errors.
-
main
-