krb5.util
Class KrbConfFile

java.lang.Object
  extended by krb5.util.KrbConfFile

public class KrbConfFile
extends java.lang.Object

Class Description : Kerberos configuration file. A modified version of the code obtained from the Open Group Research Institute.

Version:
1.1
Author:
Bojan Pajkovski

Constructor Summary
KrbConfFile(java.io.File _file)
          Class constructor
KrbConfFile(java.lang.String path)
          Class constructor
 
Method Summary
 java.util.Hashtable getSubsection(java.util.Hashtable section, java.lang.String subsectionName)
          Returns a subsection
 java.util.Hashtable getSubsection(java.lang.String sectionName, java.lang.String subsectionName)
          Returns a subsection
 java.lang.String getValue(java.util.Hashtable section, java.lang.String valueName)
          Returns value for a given section and key
 java.lang.String getValue(java.lang.String sectionName, java.lang.String valueName)
          Returns value for a given section and key
 java.util.Enumeration getValueNames(java.util.Hashtable section)
          Returns the key/value for a given section
 java.util.Enumeration getValueNames(java.lang.String sectionName)
          Returns the key/value for a given section
static void main(java.lang.String[] args)
          Main
 void parse()
          Parses the data
 void print()
          Print
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KrbConfFile

public KrbConfFile(java.lang.String path)
Class constructor

Parameters:
path - is of type String

KrbConfFile

public KrbConfFile(java.io.File _file)
Class constructor

Parameters:
_file - is of type File
Method Detail

parse

public void parse()
           throws KrbException
Parses the data

Throws:
KrbException - an exception
See Also:
KrbException

getValue

public java.lang.String getValue(java.lang.String sectionName,
                                 java.lang.String valueName)
Returns value for a given section and key

Parameters:
sectionName - is of type String
valueName - is of type String
Returns:
String is a result

getValue

public java.lang.String getValue(java.util.Hashtable section,
                                 java.lang.String valueName)
Returns value for a given section and key

Parameters:
section - is of type Hashtable
valueName - is of type String
Returns:
String is a result

getSubsection

public java.util.Hashtable getSubsection(java.lang.String sectionName,
                                         java.lang.String subsectionName)
Returns a subsection

Parameters:
sectionName - is of type String
subsectionName - is of type String
Returns:
Hashtable is a result

getSubsection

public java.util.Hashtable getSubsection(java.util.Hashtable section,
                                         java.lang.String subsectionName)
Returns a subsection

Parameters:
section - is of type Hashtable
subsectionName - is of type String
Returns:
Hashtable is a result

getValueNames

public java.util.Enumeration getValueNames(java.lang.String sectionName)
Returns the key/value for a given section

Parameters:
sectionName - is of type String
Returns:
Enumeration is a result

getValueNames

public java.util.Enumeration getValueNames(java.util.Hashtable section)
Returns the key/value for a given section

Parameters:
section - is of type Hashtable
Returns:
Enumeration is a result

print

public void print()
Print


main

public static void main(java.lang.String[] args)
Main

Parameters:
args - is of type String[]