Class MimeField

java.lang.Object
org.apache.hc.client5.http.entity.mime.MimeField

public class MimeField extends Object
Minimal MIME field.
Since:
4.0
  • Field Details

    • name

      private final String name
    • value

      private final String value
    • parameters

      private final List<org.apache.hc.core5.http.NameValuePair> parameters
  • Constructor Details

    • MimeField

      public MimeField(String name, String value)
      Constructs a new instance.
      Parameters:
      name - the field name.
      value - the field value.
    • MimeField

      public MimeField(String name, String value, 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 Details

    • getName

      public String getName()
      Gets the field name.
      Returns:
      the field name.
    • getValue

      public String getValue()
      Gets the field value.
      Returns:
      the field value.
      Since:
      4.6
    • getBody

      public String getBody()
      Converts this instance to a body String.
      Returns:
      this instance as a body String.
    • getParameters

      public List<org.apache.hc.core5.http.NameValuePair> getParameters()
      Gets the field parameters.
      Returns:
      the field parameters.
    • toString

      public String toString()
      Overrides:
      toString in class Object