JVM | Platform | Status |
---|---|---|
OpenJDK (Temurin) Current | Linux | |
OpenJDK (Temurin) LTS | Linux | |
OpenJDK (Temurin) Current | Windows | |
OpenJDK (Temurin) LTS | Windows |
The mime2045
package provides functions for parsing RFC 2045 MIME types.
- RFC 2045 MIME type parsing.
- Suggest file extensions for MIME types.
- High coverage test suite.
- OSGi-ready.
- JPMS-ready.
- ISC license.
Declare MIME types directly:
final var textPlain =
MimeType.of("text", "plain");
Parse MIME type strings:
final var parsed =
new MimeParsers().parse("text/plain");
assert textPlain.equals(parsed);
Suggest file extensions for MIME types:
final var parsed =
new MimeParsers().parse("text/plain");
assert Optional.of("txt").equals(MimeFileExtensions.suggestFileExtension(parsed));