|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.percederberg.mib.MIB
A class representing a MIB file. It also serves as a symbol table for the symbols in the MIB file. Each MIB object represents a distinct ASN.1 module, and several objects are thus required to represent multiple modules. An ASN.1 symbol can be uniqely identified by it's MIB (module) and symbol name.
The MIB class also handles the errors
Constructor Summary | |
MIB(java.io.File file)
Creates a MIB object by reading and parsing the given file. |
|
MIB(java.lang.String filename)
Creates a MIB object by reading and parsing the given file. |
Method Summary | |
java.lang.String |
allMessages()
Returns a concatenated string with all the messages, ordered by category. |
java.util.Enumeration |
allSymbols()
Returns an enumeration of all the symbols in the table. |
void |
clear()
Clears the MIB by recursively clearing all the symbols in the tables. |
boolean |
equals(java.lang.Object obj)
Checks if this MIB is equal to some other object. |
int |
errors()
Returns the number of found errors in this MIB. |
Symbol |
findSymbol(java.lang.String name)
Finds a symbol in the symbol table. |
java.lang.String |
getFilename()
Returns the MIB filename. |
java.lang.String |
toString()
Returns the MIB name. |
int |
warnings()
Returns the number of found warnings in this MIB. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MIB(java.lang.String filename) throws java.lang.Exception
filename
- the name of a readable MIB filejava.lang.Exception
- if the file couldn't be parsed correctlypublic MIB(java.io.File file) throws java.lang.Exception
file
- a readable MIB filejava.lang.Exception
- if the file couldn't be parsed correctlyMethod Detail |
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare withpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getFilename()
public Symbol findSymbol(java.lang.String name)
name
- the symbol namepublic java.util.Enumeration allSymbols()
public java.lang.String allMessages()
public int errors()
public int warnings()
public void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |