public class LastModifiedVersion implements Version
This version passes the given lastModified date through the client provided http conditional headers If-Modified-Since and If-Unmodified-Since.
Notice the second precision so it may work wrong if there were few changes during the same second.
For better behaviour use etag instead
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28 and https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25
| Constructor and Description |
|---|
LastModifiedVersion(java.time.ZonedDateTime lastModified)
This version passes the given lastModified date through the client provided
http conditional headers If-Modified-Since and If-Unmodified-Since.
|
LastModifiedVersion(java.nio.file.attribute.FileTime lastModified) |
LastModifiedVersion(java.util.Date lastModified) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendHeadersTo(HeadersBuilder builder)
Appends relevant headers to the builder
|
VersionCheckResult |
check(Headers requestHeaders) |
java.time.ZonedDateTime |
component1()
of the current content,
|
LastModifiedVersion |
copy(java.time.ZonedDateTime lastModified)
This version passes the given lastModified date through the client provided
http conditional headers If-Modified-Since and If-Unmodified-Since.
|
boolean |
equals(java.lang.Object p) |
java.time.ZonedDateTime |
getLastModified()
of the current content,
|
int |
hashCode() |
java.lang.String |
toString() |
appendHeadersTo, checkpublic LastModifiedVersion(java.time.ZonedDateTime lastModified)
This version passes the given lastModified date through the client provided http conditional headers If-Modified-Since and If-Unmodified-Since.
Notice the second precision so it may work wrong if there were few changes during the same second.
For better behaviour use etag instead
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28 and https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25
lastModified - of the current content, for example file's last modified datelastModified - of the current content, for example file's last modified datepublic LastModifiedVersion(java.nio.file.attribute.FileTime lastModified)
public LastModifiedVersion(java.util.Date lastModified)
public VersionCheckResult check(Headers requestHeaders)
public void appendHeadersTo(HeadersBuilder builder)
Appends relevant headers to the builder
public java.time.ZonedDateTime getLastModified()
of the current content,
for example file's last modified date
public java.time.ZonedDateTime component1()
of the current content,
for example file's last modified date
public LastModifiedVersion copy(java.time.ZonedDateTime lastModified)
This version passes the given lastModified date through the client provided http conditional headers If-Modified-Since and If-Unmodified-Since.
Notice the second precision so it may work wrong if there were few changes during the same second.
For better behaviour use etag instead
See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28 and https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25
lastModified - of the current content, for example file's last modified datepublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)