Interface TextData

All Superinterfaces:
UploadData

public interface TextData extends UploadData
An upload data of the text/plain content type.
  • Method Summary

    Modifier and Type
    Method
    Description
    default byte[]
    Returns an array containing the upload data bytes of the associated URL request.
    default ContentType
    Returns the content type of this upload data as specified in the Content-Type header.
    default String
    Returns a text representation of the upload data.
    static TextData
    of(String text)
    Returns an instance of TextData with the given upload data obtained from the text string.
  • Method Details

    • of

      static TextData of(String text)
      Returns an instance of TextData with the given upload data obtained from the text string.
    • data

      default String data()
      Returns a text representation of the upload data.
    • bytes

      default byte[] bytes()
      Description copied from interface: UploadData
      Returns an array containing the upload data bytes of the associated URL request.

      If the upload data is constructed manually and is not associated with a URL request, returns an empty array.

      Specified by:
      bytes in interface UploadData
    • contentType

      default ContentType contentType()
      Description copied from interface: UploadData
      Returns the content type of this upload data as specified in the Content-Type header.

      If the upload data is constructed manually, the Content-Type header will be created after it is passed to the Chromium engine. Thus, the returned ContentType object will not contain meaningful values in this case.

      Specified by:
      contentType in interface UploadData