ASN1RelativeOID (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.asn1

## Class ASN1RelativeOID

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.ASN1Primitive
    - - org.bouncycastle.asn1.ASN1RelativeOID

- All Implemented Interfaces:
    ASN1Encodable, Encodable

      public class ASN1RelativeOID
      extends ASN1Primitive

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ASN1RelativeOID(java.lang.String identifier)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ASN1RelativeOID` | `branch(java.lang.String branchID)`
    `static ASN1RelativeOID` | `fromContents(byte[] contents)`
    `java.lang.String` | `getId()`
    `static ASN1RelativeOID` | `getInstance(ASN1TaggedObject taggedObject, boolean declaredExplicit)`
    `static ASN1RelativeOID` | `getInstance(java.lang.Object obj)`
    `static ASN1RelativeOID` | `getTagged(ASN1TaggedObject taggedObject, boolean declaredExplicit)`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`
    `static ASN1RelativeOID` | `tryFromID(java.lang.String identifier)`

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Primitive

      `encodeTo, encodeTo, equals, equals, equals, fromByteArray, fromStream, toASN1Primitive`

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `getEncoded, getEncoded, hasEncodedTagValue`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ASN1RelativeOID

          public ASN1RelativeOID(java.lang.String identifier)

  - ### Method Detail

    - #### fromContents

          public static ASN1RelativeOID fromContents(byte[] contents)

    - #### getInstance

          public static ASN1RelativeOID getInstance(java.lang.Object obj)

    - #### getInstance

          public static ASN1RelativeOID getInstance(ASN1TaggedObject taggedObject,
                                                    boolean declaredExplicit)

    - #### getTagged

          public static ASN1RelativeOID getTagged(ASN1TaggedObject taggedObject,
                                                  boolean declaredExplicit)

    - #### tryFromID

          public static ASN1RelativeOID tryFromID(java.lang.String identifier)

    - #### branch

          public ASN1RelativeOID branch(java.lang.String branchID)

    - #### getId

          public java.lang.String getId()

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `ASN1Primitive`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`