Class ContentType

java.lang.Object
ch.autumo.commons.cache.ContentType

public class ContentType extends Object
Class to handle HTML content types headers and their encodings.
  • Field Details

    • MULTIPART_FORM_DATA_HEADER

      public static final String MULTIPART_FORM_DATA_HEADER
      Multipart form data header string.
      See Also:
  • Constructor Details

    • ContentType

      public ContentType(String contentTypeHeader)
      Create a content type.
      Parameters:
      contentTypeHeader - Content type header
  • Method Details

    • getContentTypeHeader

      public String getContentTypeHeader()
      Get content type header.
      Returns:
      content type header
    • getContentType

      public String getContentType()
      Get content type.
      Returns:
      content type
    • getEncoding

      public String getEncoding()
      Get encoding.
      Returns:
      encoding
    • getBoundary

      public String getBoundary()
      Get boundary.
      Returns:
      boundary
    • isMultipart

      public boolean isMultipart()
      Is multipart?
      Returns:
      true if so
    • tryUTF8

      public ContentType tryUTF8()
      Create an UTF8 content type if this encoding is not set, otherwise this content type is returned.
      Returns:
      UTF8 content type if this encoding is not set