Package org.biojava.nbio.core.util
Enum Class FileDownloadUtils.ETagPolicy
java.lang.Object
java.lang.Enum<FileDownloadUtils.ETagPolicy>
org.biojava.nbio.core.util.FileDownloadUtils.ETagPolicy
- All Implemented Interfaces:
Serializable,Comparable<FileDownloadUtils.ETagPolicy>,java.lang.constant.Constable
- Enclosing class:
FileDownloadUtils
What to do with the
ETag response header when no explicit hash
URL is available.
Some archives — notably files.wwpdb.org and
files.rcsb.org — return the MD5 digest of the content as
the bare ETag value, which lets us record a real checksum
without a second request. Others (the EBI servers, for instance) return a
<modification-time>-<size> form instead; because that
always contains a -, it can never be mistaken for a hex digest.
- Since:
- 7.3.0
- Author:
- Amr ALHOSSARY
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNever look at theETagheader.AsUSE_IF_HEX_DIGEST, but log a warning when the header is missing or is not a usable digest.Record theETagas a checksum when it is a bare hex digest of a length matching one of the supported algorithms. -
Method Summary
Modifier and TypeMethodDescriptionstatic FileDownloadUtils.ETagPolicyReturns the enum constant of this class with the specified name.static FileDownloadUtils.ETagPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IGNORE
Never look at theETagheader. -
USE_IF_HEX_DIGEST
Record theETagas a checksum when it is a bare hex digest of a length matching one of the supported algorithms. -
REQUIRE
AsUSE_IF_HEX_DIGEST, but log a warning when the header is missing or is not a usable digest.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-