public class FormUrlEncoder extends Object implements DataValueVisitor
DataValue
for the application/x-www-form-urlencoded
media type.Modifier and Type | Method and Description |
---|---|
static List<Map.Entry<String,String>> |
encode(DataValue<?> value)
Returns the name/value pairs that encode the given
DataValue , applying
the application/x-www-form-urlencoded encoding to all pairs. |
static List<Map.Entry<String,String>> |
encode(DataValue<?> value,
boolean encoded)
Returns the name/value pairs that encode the given
DataValue . |
static List<Map.Entry<String,String>> |
encode(DataValue<?> value,
Map<String,EncodingData> propertyEncodings,
boolean encoded)
Returns the name/value pairs that encode the given
DataValue . |
static String |
toForm(DataValue<?> value)
Returns the full encoding of the content of the given
DataValue . |
void |
visit(ArrayValue<?> data) |
void |
visit(BinaryValue data) |
void |
visit(BooleanValue data) |
void |
visit(DecimalValue data) |
void |
visit(IntegerValue data) |
void |
visit(LongValue data) |
void |
visit(NullValue data) |
void |
visit(ObjectValue data) |
void |
visit(StringValue data) |
public static List<Map.Entry<String,String>> encode(DataValue<?> value, Map<String,EncodingData> propertyEncodings, boolean encoded)
DataValue
. If encoded
is true, apply the application/x-www-form-urlencoded
encoding to all pairs.
For an ObjectValue
, use the given encodings to serialize each property value.public static List<Map.Entry<String,String>> encode(DataValue<?> value, boolean encoded)
DataValue
. If encoded
is true, apply the application/x-www-form-urlencoded
encoding to all pairs.public static List<Map.Entry<String,String>> encode(DataValue<?> value)
DataValue
, applying
the application/x-www-form-urlencoded
encoding to all pairs.public static String toForm(DataValue<?> value)
DataValue
.public void visit(ArrayValue<?> data)
visit
in interface DataValueVisitor
public void visit(BinaryValue data)
visit
in interface DataValueVisitor
public void visit(BooleanValue data)
visit
in interface DataValueVisitor
public void visit(DecimalValue data)
visit
in interface DataValueVisitor
public void visit(IntegerValue data)
visit
in interface DataValueVisitor
public void visit(LongValue data)
visit
in interface DataValueVisitor
public void visit(NullValue data)
visit
in interface DataValueVisitor
public void visit(ObjectValue data)
visit
in interface DataValueVisitor
public void visit(StringValue data)
visit
in interface DataValueVisitor
Copyright © 2024 The Cornutum Project. All rights reserved.