Top Constructors Methods
org.apache.tomcat.util.http.parser

public Class EntityTag

extends Object
Class Inheritance
Imports
java.io.IOException, .StringReader

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Boolean

Returns:

true if ETag matches, false if ETag doesn't match or null if the input is invalid
compareEntityTag
(StringReader
The input to parse
input
,
boolean
Use weak comparison e.g. match "etag" with W/"etag"
compareWeak
,
String
Resource's ETag
resourceETag
)

Parse the given input as (per RFC 7232) 1#entity-tag.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EntityTagback to summary
public EntityTag()

Method Detail

compareEntityTagback to summary
public static Boolean compareEntityTag(StringReader input, boolean compareWeak, String resourceETag) throws IOException

Parse the given input as (per RFC 7232) 1#entity-tag. Compare an ETag header with a resource ETag as described in RFC 7232 section 2.3.2.

Parameters
input:StringReader

The input to parse

compareWeak:boolean

Use weak comparison e.g. match "etag" with W/"etag"

resourceETag:String

Resource's ETag

Returns:Boolean

true if ETag matches, false if ETag doesn't match or null if the input is invalid

Exceptions
IOException:
If an I/O occurs during the parsing