Package org.refcodes.net
Interface HttpMediaTypeAccessor.HttpMediaTypeProvider<EXC extends java.lang.Exception>
-
- Type Parameters:
EXC
- TheException
to be thrown in case conversion failed. Throw aRuntimeException
in order to make this method unchecked.
- All Known Subinterfaces:
ContentType
,HttpMediaType
- All Known Implementing Classes:
ContentTypeImpl
,MediaType
- Enclosing interface:
- HttpMediaTypeAccessor
public static interface HttpMediaTypeAccessor.HttpMediaTypeProvider<EXC extends java.lang.Exception>
A provider interface provides a "toSomething(?)" method which converts a given instance into something else. TheHttpMediaTypeAccessor.HttpMediaTypeProvider
converts something like aMediaType
to a Media-Type'sString
representation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
toHttpMediaType()
A provider interface provides a "toSomething(?)"
-
-
-
Method Detail
-
toHttpMediaType
java.lang.String toHttpMediaType() throws EXC extends java.lang.Exception
A provider interface provides a "toSomething(?)" method which converts a given instance into something else. Returns the HTTP media type: It consists of the Media-Top-Level-Type and the Media-Subtype as well as some (optional) suffixed parameters all being concatenated in an HTTP valid manner, such as: "application/json;charset=UTF-8".
-
-