-
- All Known Implementing Classes:
DictionaryOIDTextFormat
,SimpleOIDTextFormat
public interface OIDTextFormat
TheOIDTextFormat
provides a textual representation of a raw object ID.- Since:
- 1.10
- Version:
- 2.2
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
format(int[] value)
Returns a textual representation of a raw object ID, for example as dotted string ("1.3.6.1.4") or object name ("ifDescr") depending on the formats representation rules.java.lang.String
formatForRoundTrip(int[] value)
Returns a textual representation of a raw object ID, for example as dotted string ("1.3.6.1.4"), object name plus numerical index ("ifDescr.0"), or other formats that can be parsed again withparse(String)
to a the same OID value.int[]
parse(java.lang.String text)
Parses a textual representation of an object ID and returns its raw value.
-
-
-
Method Detail
-
format
java.lang.String format(int[] value)
Returns a textual representation of a raw object ID, for example as dotted string ("1.3.6.1.4") or object name ("ifDescr") depending on the formats representation rules.- Parameters:
value
- the OID value to format.- Returns:
- the textual representation.
-
formatForRoundTrip
java.lang.String formatForRoundTrip(int[] value)
Returns a textual representation of a raw object ID, for example as dotted string ("1.3.6.1.4"), object name plus numerical index ("ifDescr.0"), or other formats that can be parsed again withparse(String)
to a the same OID value.- Parameters:
value
- the OID value to format.- Returns:
- the textual representation.
-
parse
int[] parse(java.lang.String text) throws java.text.ParseException
Parses a textual representation of an object ID and returns its raw value.- Parameters:
text
- a textual representation of an OID.- Returns:
- the raw OID value
- Throws:
java.text.ParseException
- if the OID cannot be parsed successfully.
-
-