- All Known Implementing Classes:
DictionaryOIDTextFormat
,SimpleOIDTextFormat
public interface OIDTextFormat
The
OIDTextFormat
provides a textual representation of a raw
object ID.- Since:
- 1.10
- Version:
- 2.2
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionformat
(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.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[]
Parses a textual representation of an object ID and returns its raw value.
-
Method Details
-
format
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
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
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:
ParseException
- if the OID cannot be parsed successfully.
-