Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jempeg.empeg.core
Class DynamicConfigFile  view DynamicConfigFile download DynamicConfigFile.java

java.lang.Object
  extended byorg.jempeg.empeg.core.DynamicConfigFile
All Implemented Interfaces:
java.io.Serializable

public class DynamicConfigFile
extends java.lang.Object
implements java.io.Serializable

DynamicConfigFile is the data format that is used to represent an Empeg config file. This is essentially Windows INI format.

Version:
$Revision: 1.10 $

Nested Class Summary
protected static class DynamicConfigFile.ConfigLine
           
 
Field Summary
private  java.util.Vector myLines
           
 
Constructor Summary
DynamicConfigFile()
           
 
Method Summary
 void clear()
           
 DynamicConfigFile.ConfigLine findLine(java.lang.String _section, java.lang.String _key)
           
protected  int findLinePos(java.lang.String _section, java.lang.String _key)
           
 DynamicConfigFile.ConfigLine findSection(int _startingOffset, java.lang.String _section)
           
protected  int findSectionPos(int _startingOffset, java.lang.String _section)
           
 void fromString(java.lang.String _configStr)
           
 boolean getBooleanValue(java.lang.String _section, java.lang.String _key, boolean _defaultValue)
           
 DynamicConfigFile.ConfigLine getLine(int _pos)
           
 java.lang.String getStringValue(java.lang.String _section, java.lang.String _key, java.lang.String _defaultValue)
           
 void setBooleanValue(java.lang.String _section, java.lang.String _key, boolean _value)
           
 void setStringValue(java.lang.String _section, java.lang.String _key, java.lang.String _value)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myLines

private java.util.Vector myLines
Constructor Detail

DynamicConfigFile

public DynamicConfigFile()
Method Detail

fromString

public void fromString(java.lang.String _configStr)

getStringValue

public java.lang.String getStringValue(java.lang.String _section,
                                       java.lang.String _key,
                                       java.lang.String _defaultValue)

getBooleanValue

public boolean getBooleanValue(java.lang.String _section,
                               java.lang.String _key,
                               boolean _defaultValue)

setBooleanValue

public void setBooleanValue(java.lang.String _section,
                            java.lang.String _key,
                            boolean _value)

setStringValue

public void setStringValue(java.lang.String _section,
                           java.lang.String _key,
                           java.lang.String _value)

getLine

public DynamicConfigFile.ConfigLine getLine(int _pos)

findSection

public DynamicConfigFile.ConfigLine findSection(int _startingOffset,
                                                java.lang.String _section)

findLine

public DynamicConfigFile.ConfigLine findLine(java.lang.String _section,
                                             java.lang.String _key)

findLinePos

protected int findLinePos(java.lang.String _section,
                          java.lang.String _key)

findSectionPos

protected int findSectionPos(int _startingOffset,
                             java.lang.String _section)

clear

public void clear()

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).