Package org.htmlunit.util
Class HeaderUtils
- java.lang.Object
-
- org.htmlunit.util.HeaderUtils
-
public final class HeaderUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
containsETag(WebResponse response)
static boolean
containsLastModified(WebResponse response)
static boolean
containsMaxAge(WebResponse response)
static boolean
containsMaxAgeOrSMaxage(WebResponse response)
static boolean
containsNoCache(WebResponse response)
static boolean
containsNoStore(WebResponse response)
static boolean
containsPrivate(WebResponse response)
static boolean
containsPublic(WebResponse response)
static boolean
containsSMaxage(WebResponse response)
static long
maxAge(WebResponse response)
static long
sMaxage(WebResponse response)
-
-
-
Method Detail
-
containsPrivate
public static boolean containsPrivate(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Cache-Control' header is present and contains 'private' value
-
containsPublic
public static boolean containsPublic(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Cache-Control' header is present and contains 'public' value
-
containsNoStore
public static boolean containsNoStore(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Cache-Control' header is present and contains 'no-store' value
-
containsNoCache
public static boolean containsNoCache(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Cache-Control' header is present and contains 'no-cache' value@return
-
containsETag
public static boolean containsETag(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Etag' header is present
-
containsLastModified
public static boolean containsLastModified(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Last-Modified' header is present
-
containsSMaxage
public static boolean containsSMaxage(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Cache-Control' header is present and contains 's-maxage' value
-
containsMaxAge
public static boolean containsMaxAge(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Cache-Control' header is present and contains 'max-age' value
-
containsMaxAgeOrSMaxage
public static boolean containsMaxAgeOrSMaxage(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- if 'Cache-Control' header is present and contains 'max-age' value
-
sMaxage
public static long sMaxage(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- value of 's-maxage' directive and 0 if it is absent
-
maxAge
public static long maxAge(WebResponse response)
- Parameters:
response
-WebResponse
- Returns:
- value of 'max-age' directive and 0 if it is absent
-
-