Class ConfigReader

java.lang.Object
com.djrapitops.plan.settings.config.ConfigReader
All Implemented Interfaces:
Closeable, AutoCloseable

public class ConfigReader extends Object implements Closeable
Reader for parsing Config out of file-lines.

ConfigReader can read a single file at a time, so it is NOT thread safe.

  • Constructor Details

    • ConfigReader

      public ConfigReader(Path filePath) throws IOException
      Create a new ConfigReader for a Path.
      Parameters:
      filePath - Path to a config file.
      Throws:
      IOException - If the path can not be read.
    • ConfigReader

      public ConfigReader(InputStream in)
      Create a new ConfigReader for an InputStream.
      Parameters:
      in - InputStream of a resource that is a config.
    • ConfigReader

      public ConfigReader(BufferedReader bufferedReader)
      Create a new ConfigReader for a BufferedReader.
      Parameters:
      bufferedReader - BufferedReader of a resource that is a config.
    • ConfigReader

      public ConfigReader(Scanner scanner)
      Create a new ConfigReader for a Scanner.
      Parameters:
      scanner - Scanner of a resource that is a config.
  • Method Details