palio.util
Class HttpUtils

java.lang.Object
  extended by palio.util.HttpUtils

public class HttpUtils
extends java.lang.Object

Utility class for HTTP protocol

Author:
Krzysztof Madyniak

Constructor Summary
HttpUtils()
           
 
Method Summary
static boolean accepts(java.lang.String acceptHeader, java.lang.String toAccept)
          Returns true if the given accept header accepts the given value.
static boolean matches(java.lang.String matchHeader, java.lang.String toMatch)
          Returns true if the given match header matches the given value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpUtils

public HttpUtils()
Method Detail

accepts

public static boolean accepts(java.lang.String acceptHeader,
                              java.lang.String toAccept)
Returns true if the given accept header accepts the given value.

Parameters:
acceptHeader - The accept header.
toAccept - The value to be accepted.
Returns:
True if the given accept header accepts the given value.

matches

public static boolean matches(java.lang.String matchHeader,
                              java.lang.String toMatch)
Returns true if the given match header matches the given value.

Parameters:
matchHeader - The match header.
toMatch - The value to be matched.
Returns:
True if the given match header matches the given value.