ph mime - phax/ph-commons GitHub Wiki

Everything around MIME types: data model, parsing, and detection.

Highlights:

  • IMimeType / MimeType - MIME type representation (e.g. application/json)
  • CMimeType - constants for common MIME types
  • EMimeContentType - content type enum (application, audio, image, text, video, etc.)
  • MimeTypeParser - MIME type string parsing
  • MimeTypeDeterminator - detect MIME type from file content or extension

Maven usage

Add the following to your pom.xml to use this artifact:

<dependency>
  <groupId>com.helger.commons</groupId>
  <artifactId>ph-mime</artifactId>
  <version>x.y.z</version>
</dependency>
⚠️ **GitHub.com Fallback** ⚠️