org.jboss.resteasy.plugins.delegates
Class MediaTypeHeaderDelegate
java.lang.Object
org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate
- All Implemented Interfaces:
- RuntimeDelegate.HeaderDelegate
public class MediaTypeHeaderDelegate
- extends java.lang.Object
- implements RuntimeDelegate.HeaderDelegate
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
Method Summary |
java.lang.Object |
fromString(java.lang.String type)
Parse the supplied value and create an instance of T . |
static MediaType |
parse(java.lang.String type)
|
static int |
setParam(java.util.HashMap<java.lang.String,java.lang.String> typeParams,
java.lang.String params,
int start)
|
java.lang.String |
toString(java.lang.Object o)
Convert the supplied value to a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediaTypeHeaderDelegate
public MediaTypeHeaderDelegate()
fromString
public java.lang.Object fromString(java.lang.String type)
throws java.lang.IllegalArgumentException
- Description copied from interface:
RuntimeDelegate.HeaderDelegate
- Parse the supplied value and create an instance of
T
.
- Specified by:
fromString
in interface RuntimeDelegate.HeaderDelegate
- Parameters:
type
- the string value
- Returns:
- the newly created instance of
T
- Throws:
java.lang.IllegalArgumentException
- if the supplied string cannot be
parsed or is null
setParam
public static int setParam(java.util.HashMap<java.lang.String,java.lang.String> typeParams,
java.lang.String params,
int start)
parse
public static MediaType parse(java.lang.String type)
toString
public java.lang.String toString(java.lang.Object o)
- Description copied from interface:
RuntimeDelegate.HeaderDelegate
- Convert the supplied value to a String.
- Specified by:
toString
in interface RuntimeDelegate.HeaderDelegate
- Parameters:
o
- the value of type T
- Returns:
- a String representation of the value
Copyright © 2009. All Rights Reserved.