Class MediaTypes

java.lang.Object
io.inverno.mod.base.resource.MediaTypes

public final class MediaTypes extends Object

A collection of well known media types.

Since:
1.0
Author:
Jeremy Kuhn
  • Field Details

  • Constructor Details

    • MediaTypes

      public MediaTypes()
  • Method Details

    • normalizeApplicationMediaType

      public static String normalizeApplicationMediaType(String mediaType)

      Normalizes the specified media type.

      This method basically restores the missing application/ prefix omitted for compactness. This reduced syntax can be used for instance in a JOSE header content type parameter or in a Websocket subprotocol.

      Parameters:
      mediaType - a media type
      Returns:
      a normalized application media type