NDNts

    Class Component

    Name component.

    This type is immutable.

    Index

    Constructors

    • Construct GenericNameComponent with TLV-LENGTH zero.

      Returns Component

    • Construct from TLV-TYPE and TLV-VALUE.

      Parameters

      • type: number

        TLV-TYPE.

      • Optionalvalue: string | Uint8Array<ArrayBufferLike>

        TLV-VALUE. If specified as string, it's encoded as UTF-8 but not interpreted as URI. Use Component.from() to interpret URI.

      Returns Component

      Error Thrown if type is not a valid name component TLV-TYPE.

    • Decode from TLV.

      Parameters

      • tlv: Uint8Array

        Complete name component TLV.

      Returns Component

      Error Thrown if tlv does not contain a complete name component TLV and nothing else.

    • Internal

      Parameters

      • type: number
      • encoder: Encoder
      • length: number

      Returns Component

    Properties

    tlv: Uint8Array

    Whole TLV.

    type: number

    TLV-TYPE.

    value: Uint8Array

    TLV-VALUE.

    Accessors

    Methods

    MMNEPVFCICPMFPCPTTAAATR