Class StructuredFieldSerializer
- java.lang.Object
-
- org.apache.hc.core5.http.structured.StructuredFieldSerializer
-
public final class StructuredFieldSerializer extends java.lang.ObjectCanonical serializer for Structured Field Structured Field Values.- Since:
- 5.5
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringserialize(StructuredFieldValue value)Serializes a top-level field value.static voidserialize(CharArrayBuffer buffer, StructuredFieldValue value)Appends the canonical serialization of a top-level Structured Field value.static java.lang.StringserializeBareItem(StructuredFieldBareItem item)static voidserializeBareItem(CharArrayBuffer buffer, StructuredFieldBareItem item)Appends a canonical serialized bare Item.static java.lang.StringserializeDictionary(StructuredFieldDictionary dictionary)static voidserializeDictionary(CharArrayBuffer buffer, StructuredFieldDictionary dictionary)Appends a canonical serialized Dictionary.static java.lang.StringserializeInnerList(StructuredFieldInnerList innerList)static voidserializeInnerList(CharArrayBuffer buffer, StructuredFieldInnerList innerList)Appends a canonical serialized Inner List.static java.lang.StringserializeItem(StructuredFieldItem item)static voidserializeItem(CharArrayBuffer buffer, StructuredFieldItem item)Appends a canonical serialized Item.static java.lang.StringserializeList(StructuredFieldList list)static voidserializeList(CharArrayBuffer buffer, StructuredFieldList list)Appends a canonical serialized List.static java.lang.StringserializeParameters(StructuredFieldParameters parameters)static voidserializeParameters(CharArrayBuffer buffer, StructuredFieldParameters parameters)Appends canonical serialized parameters.
-
-
-
Method Detail
-
serialize
public static java.lang.String serialize(StructuredFieldValue value)
Serializes a top-level field value.- Parameters:
value- the Structured Field value.- Returns:
- the field value, or
nullfor an empty List or Dictionary, which Structured Field represents by omitting the field.
-
serialize
public static void serialize(CharArrayBuffer buffer, StructuredFieldValue value)
Appends the canonical serialization of a top-level Structured Field value. Empty Lists and Dictionaries append no characters because Structured Field represents them by omitting the field.- Parameters:
buffer- the destination buffer.value- the Structured Field value.
-
serializeItem
public static java.lang.String serializeItem(StructuredFieldItem item)
- Parameters:
item- the Item.- Returns:
- the canonical serialized Item.
-
serializeItem
public static void serializeItem(CharArrayBuffer buffer, StructuredFieldItem item)
Appends a canonical serialized Item.- Parameters:
buffer- the destination buffer.item- the Item.
-
serializeList
public static java.lang.String serializeList(StructuredFieldList list)
- Parameters:
list- the List.- Returns:
- the canonical serialized List, or
nullwhen empty.
-
serializeList
public static void serializeList(CharArrayBuffer buffer, StructuredFieldList list)
Appends a canonical serialized List. An empty List appends no characters.- Parameters:
buffer- the destination buffer.list- the List.
-
serializeDictionary
public static java.lang.String serializeDictionary(StructuredFieldDictionary dictionary)
- Parameters:
dictionary- the Dictionary.- Returns:
- the canonical serialized Dictionary, or
nullwhen empty.
-
serializeDictionary
public static void serializeDictionary(CharArrayBuffer buffer, StructuredFieldDictionary dictionary)
Appends a canonical serialized Dictionary. An empty Dictionary appends no characters.- Parameters:
buffer- the destination buffer.dictionary- the Dictionary.
-
serializeInnerList
public static java.lang.String serializeInnerList(StructuredFieldInnerList innerList)
- Parameters:
innerList- the Inner List.- Returns:
- the canonical serialized Inner List.
-
serializeInnerList
public static void serializeInnerList(CharArrayBuffer buffer, StructuredFieldInnerList innerList)
Appends a canonical serialized Inner List.- Parameters:
buffer- the destination buffer.innerList- the Inner List.
-
serializeParameters
public static java.lang.String serializeParameters(StructuredFieldParameters parameters)
- Parameters:
parameters- the Parameters map.- Returns:
- the canonical serialized parameters.
-
serializeParameters
public static void serializeParameters(CharArrayBuffer buffer, StructuredFieldParameters parameters)
Appends canonical serialized parameters.- Parameters:
buffer- the destination buffer.parameters- the Parameters map.
-
serializeBareItem
public static java.lang.String serializeBareItem(StructuredFieldBareItem item)
- Parameters:
item- the bare Item.- Returns:
- the canonical serialized bare Item.
-
serializeBareItem
public static void serializeBareItem(CharArrayBuffer buffer, StructuredFieldBareItem item)
Appends a canonical serialized bare Item.- Parameters:
buffer- the destination buffer.item- the bare Item.
-
-