| Modifier and Type | Field and Description |
|---|---|
| public static final String | ETAG_SEPARATOR
The separator within an etag used to indicate a compressed variant. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the weak etagthe resource to calculate etag from resource)Compute the weak etag for the provided |
| public static String | Returns: the weak etagthe resource to calculate etag from resource, String the suffix for the etag etagSuffix)Compute the weak etag for the provided |
| public static String | Returns: the weak etagthe path to calculate from path)Compute the weak etag for the provided |
| public static String | Returns: the weak etagthe path to calculate from path, String the optional suffix for the ETag suffix)Compute the weak etag for the provided |
| private static String | Returns: the calculated etag for the resourcethe name of the resource name, Instant the last modified time of the resource lastModified, long the size of the resource size, String the optional etag suffix etagSuffix)Main algorithm of how Jetty builds a unique Etag. |
| public static HttpField | Returns: the field if possible to create etag, or null if not possible.the resource to represent with an Etag. resource)Create a new |
| public static HttpField | Returns: the field if possible to create etag, or null if not possible.the resource to represent with an Etag. resource, String the suffix for the etag etagSuffix)Create a new |
| public static boolean | |
| public static boolean | |
| private static byte[] | |
| public static boolean | |
| public static String | Returns: the new etag,the original etag etag, String the new suffix to add or change (if a preexisting suffix exists) newSuffix)Rewrite etag with a new suffix, satisfying quoting rules, and preserving optional weak flag. |
| ETAG_SEPARATOR | back to summary |
|---|---|
| public static final String ETAG_SEPARATOR The separator within an etag used to indicate a compressed variant. Default separator is Adding a suffix of The separator may be changed by the
| |
| EtagUtils | back to summary |
|---|---|
| private EtagUtils() | |
| computeWeakEtag | back to summary |
|---|---|
| public static String computeWeakEtag(Resource resource) Compute the weak etag for the provided
Will use the | |
| computeWeakEtag | back to summary |
|---|---|
| public static String computeWeakEtag(Resource resource, String etagSuffix) Compute the weak etag for the provided
Will use the | |
| computeWeakEtag | back to summary |
|---|---|
| public static String computeWeakEtag(Path path) Compute the weak etag for the provided This supports relative path references as well. Which can be useful to establish a reliable etag if the base changes. | |
| computeWeakEtag | back to summary |
|---|---|
| public static String computeWeakEtag(Path path, String suffix) Compute the weak etag for the provided | |
| computeWeakEtag | back to summary |
|---|---|
| private static String computeWeakEtag(String name, Instant lastModified, long size, String etagSuffix) Main algorithm of how Jetty builds a unique Etag. | |
| createWeakEtagField | back to summary |
|---|---|
| public static HttpField createWeakEtagField(Resource resource) Create a new | |
| createWeakEtagField | back to summary |
|---|---|
| public static HttpField createWeakEtagField(Resource resource, String etagSuffix) Create a new | |
| isStrong | back to summary |
|---|---|
| public static boolean isStrong(String etag) Test if the given Etag is considered strong (not weak).
| |
| isWeak | back to summary |
|---|---|
| public static boolean isWeak(String etag) Test if the given Etag is considered weak.
| |
| longToBytes | back to summary |
|---|---|
| private static byte[] longToBytes(long value) | |
| matches | back to summary |
|---|---|
| public static boolean matches(String etag, String etagWithOptionalSuffix) Test if etag matches against an etagWithOptionalSuffix.
| |
| rewriteWithSuffix | back to summary |
|---|---|
| public static String rewriteWithSuffix(String etag, String newSuffix) Rewrite etag with a new suffix, satisfying quoting rules, and preserving optional weak flag. | |