Class StringData


  • public final class StringData
    extends Object
    String data that can be added to a HTTP request.
    Since:
    7.2.0
    Author:
    XIMA MEDIA GmbH
    • Constructor Detail

      • StringData

        public StringData​(@Nonnull
                          String data,
                          @Nonnull
                          String mimeType)
        Creates a new String data item. Uses the default charset.
        Parameters:
        data - The String data to be sent with the request.
        mimeType - The mime type of the data.
      • StringData

        public StringData​(@Nonnull
                          String data,
                          @Nonnull
                          String mimeType,
                          @Nullable
                          Charset charset)
        Creates a new String data item. Uses the default charset.
        Parameters:
        data - The String data to be sent with the request.
        mimeType - The mime type of the data.
        charset - The charset for the mime type.
    • Method Detail

      • getCharset

        public Charset getCharset()
        Returns:
        The charset for the mime type.
      • getContentType

        public org.apache.http.entity.ContentType getContentType()
        Returns:
        The content type of the data, combines the mime type and the charset.
      • getData

        public String getData()
        Returns:
        The String data to be sent with the request.
      • getMimeType

        public String getMimeType()
        Returns:
        The mime type of the data.