Package sidplay.ini

Klasse IniReader

java.lang.Object
sidplay.ini.IniReader

public class IniReader extends Object
This class can read properties files in Microsoft .ini file style and provides an interface to read string, integer and boolean values. The .ini files has the following structure:
 ; one type of comment
 # another type of comment (will be removed in future)
 [SectionNameWithNoSpaces]
 Key string = whatever you want
 
Autor:
Antti S. Lankila
  • Felddetails

    • COMMENT

      private static final Pattern COMMENT
      Commented line syntax.
      e.g. "; comment" or "# comment"
    • SECTION_HEADING

      private static final Pattern SECTION_HEADING
      Section heading syntax
      e.g. "[Heading]"
    • KEY_VALUE

      private static final Pattern KEY_VALUE
      Key value syntax
      e.g. "Key String=Value String"
    • sections

      private final Map<String,Map<String,String>> sections
    • dirty

      private boolean dirty
  • Konstruktordetails

  • Methodendetails

    • isDirty

      public final boolean isDirty()
    • listSections

      public final String[] listSections()
    • sectionProperties

      public final String[] sectionProperties(String section)
    • initialize

      private void initialize(BufferedReader r) throws IOException
      Löst aus:
      IOException
    • save

      public final void save(String outputname) throws IOException
      Löst aus:
      IOException
    • getPropertyString

      public final String getPropertyString(String section, String key, String defaultValue)
    • getPropertyFloats

      public final float[] getPropertyFloats(String section, String key, float[] defaultValue)
    • getPropertyFloat

      public final float getPropertyFloat(String section, String key, float defaultValue)
    • getPropertyInts

      public final int[] getPropertyInts(String section, String key, int[] defaultValue)
    • getPropertyInt

      public final int getPropertyInt(String section, String key, int defaultValue)
    • getPropertyShort

      public final short getPropertyShort(String section, String key, short defaultValue)
    • getPropertyBool

      public final boolean getPropertyBool(String section, String key, boolean defaultValue)
    • getPropertyChar

      public final char getPropertyChar(String section, String key, char defaultValue)
    • getPropertyTime

      public final double getPropertyTime(String section, String key, double defaultValue)
    • getPropertyFile

      public final File getPropertyFile(String section, String key, File defaultValue)
    • getPropertyEnum

      public final <T extends Enum<T>> T getPropertyEnum(String section, String key, T defaultValue, Class<T> class1)
    • setPropertyArray

      public final void setPropertyArray(String section, String key, Object... value)
    • setProperty

      public final void setProperty(String section, String key, Object value)
    • parseTime

      private double parseTime(String time)