@rdfjs/wrapper
    Preparing search index...

    Function uInt8Array

    • Maps a binary literal to a typed array.

      Parameters

      • term: TermWrapper

        The term containing hexadecimal or Base64 encoded binary data.

      Returns Uint8Array

      An array of 8-bit unsigned integers decoded from the term's value according to its datatype.

      This method is only available in Node.js.

      Supports the following datatypes:

      Uses the following methods to convert eligible values:

      ReferenceError If the term is undefined or null.

      TypeError If the term is not a TermWrapper.

      TermTypeError If the term is not a literal.

      TermTypeError If the term is not a literal.

      LiteralDatatypeError If the term's datatype is not one of the supported datatypes.

      SyntaxError If the term's lexical value cannot be converted.

      The RDF

      <s> <p> "30313233343536373839"^^<xsd:hexBinary> .
      

      can be represented by the mapping

      class Class extends TermWrapper {
      public get property(): Uint8Array {
      return this.singular("p", TermAs.uInt8Array)
      }
      }

      which returns the value [48, 49, 50, 51, 52, 53, 54, 55, 56, 57].

      The RDF

      <s> <p> "MDEyMzQ1Njc4OQ=="^^<xsd:base64Binary> .
      

      can be represented by the mapping

      class Class extends TermWrapper {
      public get property(): Uint8Array {
      return this.singular("p", TermAs.uInt8Array)
      }
      }

      which returns the value [48, 49, 50, 51, 52, 53, 54, 55, 56, 57].