Class MimeField


  • public class MimeField
    extends java.lang.Object
    Minimal MIME field.
    Since:
    4.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String name  
      private java.util.List<org.apache.hc.core5.http.NameValuePair> parameters  
      private java.lang.String value  
    • 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.String getBody()
      Converts this instance to a body String.
      java.lang.String getName()
      Gets the field name.
      java.util.List<org.apache.hc.core5.http.NameValuePair> getParameters()
      Gets the field parameters.
      java.lang.String getValue()
      Gets the field value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private final java.lang.String name
      • value

        private final java.lang.String value
      • parameters

        private final java.util.List<org.apache.hc.core5.http.NameValuePair> parameters
    • 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:
        toString in class java.lang.Object