public static final class RepositoryLayout.Checksum
extends java.lang.Object
MessageDigest.getInstance(String), e.g. "SHA-1" or "MD5".| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
algorithm |
private java.net.URI |
location |
| Constructor and Description |
|---|
Checksum(java.lang.String algorithm,
java.net.URI location)
Creates a new checksum file descriptor with the specified algorithm and location.
|
| Modifier and Type | Method and Description |
|---|---|
static RepositoryLayout.Checksum |
forLocation(java.net.URI location,
java.lang.String algorithm)
Creates a checksum file descriptor for the specified artifact/metadata location and algorithm.
|
java.lang.String |
getAlgorithm()
Gets the name of the algorithm that is used to calculate the checksum.
|
java.net.URI |
getLocation()
Gets the location of the checksum file with a remote repository.
|
java.lang.String |
toString() |
private static void |
verify(java.lang.String algorithm,
java.net.URI location) |
private final java.lang.String algorithm
private final java.net.URI location
public Checksum(java.lang.String algorithm,
java.net.URI location)
forLocation(URI, String) is usually more convenient though.algorithm - The algorithm used to calculate the checksum, must not be null.location - The relative URI to the checksum file within a repository, must not be null.public static RepositoryLayout.Checksum forLocation(java.net.URI location, java.lang.String algorithm)
location - The relative URI to the artifact/metadata whose checksum file is being obtained, must not be
null and must not have a query or fragment part.algorithm - The algorithm used to calculate the checksum, must not be null.null.private static void verify(java.lang.String algorithm,
java.net.URI location)
public java.lang.String getAlgorithm()
null.MessageDigest.getInstance(String)public java.net.URI getLocation()
null.public java.lang.String toString()
toString in class java.lang.Object