Class SignatureField
java.lang.Object
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,byte[]> SequencedMap<String,
byte[]>
The
Signature
HTTP Field.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.SignatureField
(Map<String, byte[]> members) A constructor with dictionary members, each of which represents a pair of label and signature. -
Method Summary
Modifier and TypeMethodDescriptionstatic SignatureField
Parse the value of theSignature
HTTP field.Serialize the dictionary represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and return the resulting string.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.toString()
Get the string representation of this instance, which is the serialized dictionary returned by theserialize()
method.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
SignatureField
public SignatureField()The default constructor. -
SignatureField
-
-
Method Details
-
parse
Parse the value of theSignature
HTTP field.- Parameters:
fieldValue
- The value of theSignature
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
Get the string representation of this instance, which is the serialized dictionary returned by theserialize()
method.- Overrides:
toString
in classAbstractMap<String,
T> - Returns:
- The string representation of this instance.
-
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
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.
-