Interface ContentTypeField

All Superinterfaces:
Field, ParsedField
All Known Implementing Classes:
ContentTypeFieldImpl, ContentTypeFieldLenientImpl

public interface ContentTypeField extends ParsedField
  • Field Details

  • Method Details

    • bodyDescriptionField

      default boolean bodyDescriptionField()
      Specified by:
      bodyDescriptionField in interface ParsedField
    • getMimeType

      String getMimeType()
      Gets the MIME type defined in this Content-Type field.
      Returns:
      the MIME type or an empty string if not set.
    • getMediaType

      String getMediaType()
      Gets the media type defined in this Content-Type field.
    • getSubType

      String getSubType()
      Gets the subtype defined in this Content-Type field.
    • getParameter

      String getParameter(String name)
      Gets the value of a parameter. Parameter names are case-insensitive.
      Parameters:
      name - the name of the parameter to get.
      Returns:
      the parameter value or null if not set.
    • getParameters

      Map<String,String> getParameters()
      Gets all parameters.
      Returns:
      the parameters.
    • isMimeType

      boolean isMimeType(String mimeType)
      Determines if the MIME type of this field matches the given one.
      Parameters:
      mimeType - the MIME type to match against.
      Returns:
      true if the MIME type of this field matches, false otherwise.
    • isMultipart

      boolean isMultipart()
      Determines if the MIME type of this field is multipart/*.
      Returns:
      true if this field is has a multipart/* MIME type, false otherwise.
    • getBoundary

      String getBoundary()
      Gets the value of the boundary parameter if set.
      Returns:
      the boundary parameter value or null if not set.
    • getCharset

      String getCharset()
      Gets the value of the charset parameter if set.
      Returns:
      the charset parameter value or null if not set.