Class ConfigFile

java.lang.Object
org.harctoolbox.jirc.ConfigFile

public final class ConfigFile extends Object
This class parses the Lircd configuration file(s). Its preferred public members are the static functions parseConfig, returning a RemoteSet.
  • Field Details

    • defaultCharsetName

      public static final String 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 of IrRemote's.
      Parameters:
      filename - lirc.conf file
      charsetName - 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 a RemoteSet.
      Parameters:
      filename - Lirc configuration file
      charsetName - Name of the character 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 a Reader for one or many Lirc configuration "file(s)", and returns a RemoteSet.
      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

      public static void main(String[] args)