Class Krb5Parser
java.lang.Object
org.apache.kerby.kerberos.kerb.common.Krb5Parser
A parser to parse krb5.conf format file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddump()Print all the meaningful contents of the krb5.conf on the console.getItems()Get the whole map.getSection(String sectionName, String... keys) Get the contents of a section given the section name.Get all the names of sections in a list.voidload()Load the krb5.conf into a member variable, which is a Map.
-
Constructor Details
-
Krb5Parser
-
-
Method Details
-
load
Load the krb5.conf into a member variable, which is a Map.- Throws:
IOException- e
-
getItems
Get the whole map.- Returns:
- member variable items.
-
getSections
Get all the names of sections in a list.- Returns:
- a list of section names.
-
getSection
Get the contents of a section given the section name.- Parameters:
sectionName- the name of a sectionkeys- the keys list- Returns:
- a Map of section contents
-
dump
public void dump()Print all the meaningful contents of the krb5.conf on the console. Comments are ignored. Hierarchy is considered. Attention that the order of sections and the order inside a section will be different to the original file, due to the use of HashMap.
-