|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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.
This class also stores all the errors, warnings and messages output during the MIB file reading. The MIB file parsing will only be interrupted by a critical error (syntax) error.
Constructor Summary | |
Mib(java.io.File file)
Creates a MIB by reading and parsing the specified file. |
|
Mib(java.lang.String filename)
Creates a MIB by reading and parsing the specified file. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Checks if this MIB is equal to some other object. |
java.lang.String |
getAllMessages()
Returns a string with all the parse message. |
java.util.Enumeration |
getAllSymbols()
Returns an enumeration of all the symbols in this MIB. |
java.lang.String |
getError(int index)
Returns a specified error message. |
int |
getErrorCount()
Returns the number of parse errors in this MIB. |
java.io.File |
getFile()
Returns the MIB file. |
java.lang.String |
getMessage(int index)
Returns a specified parse message. |
int |
getMessageCount()
Returns the number of parse messages in this MIB. |
java.lang.String |
getName()
Returns the MIB name. |
Symbol |
getSymbol(int index)
Returns a specified symbol in this MIB. |
Symbol |
getSymbol(java.lang.String name)
Returns a specified symbol in this MIB. |
int |
getSymbolCount()
Returns the number of symbols in this MIB. |
java.lang.String |
getWarning(int index)
Returns a specified warning message. |
int |
getWarningCount()
Returns the number of parse warnings in this MIB. |
java.lang.String |
toString()
Returns the MIB name. |
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.io.FileNotFoundException, ParseException
filename
- the name of a the MIB file to read
java.io.FileNotFoundException
- if the file couldn't be found
ParseException
- if the file couldn't be parsed correctlypublic Mib(java.io.File file) throws java.io.FileNotFoundException, ParseException
file
- the MIB file to read
java.io.FileNotFoundException
- if the file couldn't be found
ParseException
- 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 with
public java.lang.String toString()
toString
in class java.lang.Object
public java.io.File getFile()
public java.lang.String getName()
public int getSymbolCount()
public Symbol getSymbol(int index)
index
- the symbol index
public Symbol getSymbol(java.lang.String name)
name
- the symbol name
public java.util.Enumeration getAllSymbols()
public int getErrorCount()
public java.lang.String getError(int index)
index
- the error index
public int getWarningCount()
public java.lang.String getWarning(int index)
index
- the warning index
public int getMessageCount()
public java.lang.String getMessage(int index)
index
- the message index
public java.lang.String getAllMessages()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |