Package io.apicurio.registry.util
Class ContentTypeUtil
- java.lang.Object
-
- io.apicurio.registry.util.ContentTypeUtil
-
public final class ContentTypeUtil extends Object
- Author:
- eric.wittmann@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description static String
CT_APPLICATION_JSON
static String
CT_APPLICATION_XML
static String
CT_APPLICATION_YAML
-
Constructor Summary
Constructors Constructor Description ContentTypeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isApplicationJson(String ct)
Returns true if the Content-Type of the inbound request is "application/json".static boolean
isApplicationYaml(String ct)
Returns true if the Content-Type of the inbound request is "application/x-yaml".static ContentHandle
yamlToJson(ContentHandle yaml)
-
-
-
Field Detail
-
CT_APPLICATION_JSON
public static final String CT_APPLICATION_JSON
- See Also:
- Constant Field Values
-
CT_APPLICATION_YAML
public static final String CT_APPLICATION_YAML
- See Also:
- Constant Field Values
-
CT_APPLICATION_XML
public static final String CT_APPLICATION_XML
- See Also:
- Constant Field Values
-
-
Method Detail
-
isApplicationJson
public static boolean isApplicationJson(String ct)
Returns true if the Content-Type of the inbound request is "application/json".- Parameters:
ct
- content type
-
isApplicationYaml
public static boolean isApplicationYaml(String ct)
Returns true if the Content-Type of the inbound request is "application/x-yaml".- Parameters:
ct
- content type
-
yamlToJson
public static ContentHandle yamlToJson(ContentHandle yaml)
-
-