Class MimeField
- java.lang.Object
-
- org.apache.hc.client5.http.entity.mime.MimeField
-
public class MimeField extends java.lang.ObjectMinimal MIME field.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringnameprivate java.util.List<org.apache.hc.core5.http.NameValuePair>parametersprivate java.lang.Stringvalue
-
Constructor Summary
Constructors Constructor Description MimeField(java.lang.String name, java.lang.String value)Constructs a new instance.MimeField(java.lang.String name, java.lang.String value, java.util.List<org.apache.hc.core5.http.NameValuePair> parameters)Constructs a new instance.MimeField(MimeField from)Constructs a new instance by copying another's properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBody()Converts this instance to a body String.java.lang.StringgetName()Gets the field name.java.util.List<org.apache.hc.core5.http.NameValuePair>getParameters()Gets the field parameters.java.lang.StringgetValue()Gets the field value.java.lang.StringtoString()
-
-
-
Constructor Detail
-
MimeField
public MimeField(java.lang.String name, java.lang.String value)Constructs a new instance.- Parameters:
name- the field name.value- the field value.
-
MimeField
public MimeField(java.lang.String name, java.lang.String value, java.util.List<org.apache.hc.core5.http.NameValuePair> parameters)Constructs a new instance.- Parameters:
name- the field name.value- the field value.parameters- the field parameters.- Since:
- 4.6
-
MimeField
public MimeField(MimeField from)
Constructs a new instance by copying another's properties.- Parameters:
from- the source field.
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the field name.- Returns:
- the field name.
-
getValue
public java.lang.String getValue()
Gets the field value.- Returns:
- the field value.
- Since:
- 4.6
-
getBody
public java.lang.String getBody()
Converts this instance to a body String.- Returns:
- this instance as a body String.
-
getParameters
public java.util.List<org.apache.hc.core5.http.NameValuePair> getParameters()
Gets the field parameters.- Returns:
- the field parameters.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-