rabbit.proxy
Class ETagUtils

java.lang.Object
  extended by rabbit.proxy.ETagUtils

public class ETagUtils
extends Object

Methods dealing with etags

Author:
Robert Olofsson

Constructor Summary
ETagUtils()
           
 
Method Summary
static boolean checkStrongEtag(String et, String im)
          Check if we have a strong etag match.
static boolean checkWeakEtag(HttpHeader h1, HttpHeader h2)
          Remove any W/ prefix then check if etags are equal.
static boolean checkWeakEtag(String et, String im)
          Remove any W/ prefix from the inputs then check if they are equal.
static boolean isWeak(String t)
          Check if the given etag is weak.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ETagUtils

public ETagUtils()
Method Detail

isWeak

public static boolean isWeak(String t)
Check if the given etag is weak.


checkStrongEtag

public static boolean checkStrongEtag(String et,
                                      String im)
Check if we have a strong etag match.


checkWeakEtag

public static boolean checkWeakEtag(HttpHeader h1,
                                    HttpHeader h2)
Remove any W/ prefix then check if etags are equal. Inputs can be in any order.

Returns:
true if the etags match or at least one of the etag headers do not exist.

checkWeakEtag

public static boolean checkWeakEtag(String et,
                                    String im)
Remove any W/ prefix from the inputs then check if they are equal. Inputs can be in any order.

Returns:
true if equal.