com.sun.ws.rest.spi.header
Interface HeaderProvider<T>


public interface HeaderProvider<T>

A provider that supports the conversion of an HTTP header, of type T, to and from a String.


Method Summary
 T fromString(java.lang.String header)
          Convert a String to a HTTP header of type T.
 boolean supports(java.lang.Class<?> type)
          Ascertain if the HeaderProvider supports a particular type.
 java.lang.String toString(T header)
          Convert a HTTP header of type T to a String.
 

Method Detail

supports

boolean supports(java.lang.Class<?> type)
Ascertain if the HeaderProvider supports a particular type.

Parameters:
type - the type that is to be supported.
Returns:
true if the type is supported, otherwise false.

toString

java.lang.String toString(T header)
Convert a HTTP header of type T to a String.

Parameters:
header - the HTTP header of type T
Returns:
the HTTP header as a String

fromString

T fromString(java.lang.String header)
             throws java.text.ParseException
Convert a String to a HTTP header of type T.

Parameters:
header - the HTTP header as a String
Returns:
the HTTP header of type T
Throws:
java.text.ParseException - if the header cannot be parsed