Class MediaTypeHeaderDelegate
- java.lang.Object
-
- org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate
-
- All Implemented Interfaces:
RuntimeDelegate.HeaderDelegate<MediaType>
public class MediaTypeHeaderDelegate extends Object implements RuntimeDelegate.HeaderDelegate<MediaType>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description static MediaTypeHeaderDelegateINSTANCE
-
Constructor Summary
Constructors Constructor Description MediaTypeHeaderDelegate()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidclearCache()MediaTypefromString(String type)Parse the supplied value and create an instance ofT.protected static booleanisValid(String str)static MediaTypeparse(String type)static booleanquoted(String str)StringtoString(MediaType type)Convert the supplied value to a String.
-
-
-
Field Detail
-
INSTANCE
public static final MediaTypeHeaderDelegate INSTANCE
-
-
Method Detail
-
fromString
public MediaType fromString(String type) throws IllegalArgumentException
Description copied from interface:RuntimeDelegate.HeaderDelegateParse the supplied value and create an instance ofT.- Specified by:
fromStringin interfaceRuntimeDelegate.HeaderDelegate<MediaType>- Parameters:
type- the string value.- Returns:
- the newly created instance of
T. - Throws:
IllegalArgumentException- if the supplied string cannot be parsed or isnull.
-
isValid
protected static boolean isValid(String str)
-
quoted
public static boolean quoted(String str)
-
toString
public String toString(MediaType type)
Description copied from interface:RuntimeDelegate.HeaderDelegateConvert the supplied value to a String.- Specified by:
toStringin interfaceRuntimeDelegate.HeaderDelegate<MediaType>- Parameters:
type- the value of typeT.- Returns:
- a String representation of the value.
-
clearCache
public static void clearCache()
-
-