Class SignatureInputField

  • Constructor Details

    • SignatureInputField

      public SignatureInputField()
      The default constructor.
    • SignatureInputField

      public SignatureInputField(Map<String,? extends SignatureMetadata> members)
      A constructor with dictionary members, each of which represents a pair of label and signature metadata.
      Parameters:
      members - Dictionary members in the value of the Signature-Input HTTP field.
  • Method Details

    • parse

      public static SignatureInputField parse(String fieldValue) throws SignatureException
      Parse the value of the Signature-Input HTTP field.
      Parameters:
      fieldValue - The value of the Signature-Input HTTP field. If null is passed, this method returns null.
      Returns:
      The parsed field value.
      Throws:
      SignatureException - The passed field value could not be parsed successfully.
    • toString

      public String toString()
      Get the string representation of this instance, which is the serialized dictionary returned by the serialize() method.
      Overrides:
      toString in class AbstractMap<String,T>
      Returns:
      The string representation of this instance.
    • serialize

      public String serialize()
      Serialize the dictionary represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and return the resulting string.
      Returns:
      The serialized dictionary represented by this instance.
    • serializeTo

      public StringBuilder serializeTo(StringBuilder sb)
      Serialize the dictionary represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and write the resulting string into the specified string builder.

      The ABNF for Dictionaries from RFC 8941 Structured Field Values for HTTP, 3.2. Dictionaries:

       sf-dictionary  = dict-member *( OWS "," OWS dict-member )
       dict-member    = member-key ( parameters / ( "=" member-value ))
       member-key     = key
       member-value   = sf-item / inner-list
       
      Parameters:
      sb - A string builder into which the resulting string is written.
      Returns:
      The same string builder that was passed as the argument.