Class CfFileReader

java.lang.Object
fr.esrf.tangoatk.widget.util.chart.CfFileReader

public class CfFileReader extends Object
A class to parse configuration file
Author:
JL Pons
  • Field Details

  • Constructor Details

    • CfFileReader

      public CfFileReader()
  • Method Details

    • getCurrentChar

      protected char getCurrentChar() throws IOException
      Throws:
      IOException
    • eof

      protected boolean eof() throws IOException
      Throws:
      IOException
    • readWord

      protected String readWord() throws IOException
      Throws:
      IOException
    • parse

      protected boolean parse() throws IOException
      Throws:
      IOException
    • parseText

      public boolean parseText(String text)
      Parse the given string and fill property vector.
      Parameters:
      text - String containing text to parse
      Returns:
      Return true when text succesfully parsed
    • readFile

      public boolean readFile(String filename)
      Parse the given file and fill property vector.
      Parameters:
      filename - File to parse
      Returns:
      Return true when file succesfully parsed
    • readFile

      public boolean readFile(File file)
      Parse the given file and fill property vector.
      Parameters:
      file - File to parse
      Returns:
      Return true when file successfully parsed
    • readStream

      public boolean readStream(BufferedReader stream)
    • getNames

      public Vector<String> getNames()
      Return all parameter names found in the config file.
      Returns:
      Returns a vector of String.
    • getParam

      public Vector<String> getParam(String name)
      Return parameter value, one parameter can have multiple fields seperated by a colon.
      Parameters:
      name - Parameter name
      Returns:
      Returns a vector of String. (1 string per field)
    • main

      public static void main(String[] args)