Interface ByteString

All Superinterfaces:
Serializable
All Known Implementing Classes:
ASN1OctetString

This interface defines a set of methods for treating a value as either a string or byte array.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Appends the value of this byte string to the provided buffer.
    byte[]
    Retrieves a byte array containing the binary value for this byte string.
    Retrieves the value for this byte string as a String.
    Converts this byte string to an ASN.1 octet string.
  • Method Details

    • getValue

      @NotNull byte[] getValue()
      Retrieves a byte array containing the binary value for this byte string.
      Returns:
      A byte array containing the binary value for this byte string.
    • stringValue

      Retrieves the value for this byte string as a String.
      Returns:
      The value for this byte string as a String.
    • appendValueTo

      Appends the value of this byte string to the provided buffer. It must not use the ByteStringBuffer.append(ByteString) method, since that method relies on this method.
      Parameters:
      buffer - The buffer to which the value should be appended.
    • toASN1OctetString

      Converts this byte string to an ASN.1 octet string.
      Returns:
      An ASN.1 octet string with the value of this byte string.