org.jboss.resteasy.plugins.delegates
Class MediaTypeHeaderDelegate

java.lang.Object
  extended by org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate
All Implemented Interfaces:
RuntimeDelegate.HeaderDelegate

public class MediaTypeHeaderDelegate
extends Object
implements RuntimeDelegate.HeaderDelegate

Version:
$Revision: 1 $
Author:
Bill Burke

Constructor Summary
MediaTypeHeaderDelegate()
           
 
Method Summary
 Object fromString(String type)
          Parse the supplied value and create an instance of T.
static MediaType parse(String type)
           
 String toString(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
 

Constructor Detail

MediaTypeHeaderDelegate

public MediaTypeHeaderDelegate()
Method Detail

fromString

public Object fromString(String type)
                  throws 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:
IllegalArgumentException - if the supplied string cannot be parsed or is null

parse

public static MediaType parse(String type)

toString

public String toString(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 © 2012. All Rights Reserved.