Package org.xmlresolver.cache
Class CacheEntry
java.lang.Object
org.xmlresolver.cache.CacheEntry
An entry in the cache.
Each entry in the cache is represented by a CacheEntry object that identifies the URI, local file,
and other details about the entry. This object represents the data, the actual cached resource.
It contains a pointer back to the XML Catalog entry for the resource.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CacheEntry
(EntryPublic entry, long time) Cache a public entry.protected
CacheEntry
(EntrySystem entry, long time) Cache a system entry.protected
CacheEntry
(EntryUri entry, long time) Cache a URI. -
Method Summary
-
Field Details
-
entry
The XML Catalog entry for this cached resource. -
uri
The URI of the resource. -
file
The local file where this resource is cached. -
time
public final long timeThe date when the resource was cached. -
expired
public boolean expiredIs this resource expired?
-
-
Constructor Details
-
CacheEntry
Cache a URI.- Parameters:
entry
- the catalog entrytime
- the timestamp.
-
CacheEntry
Cache a system entry.- Parameters:
entry
- the catalog entrytime
- the timestamp.
-
CacheEntry
Cache a public entry.- Parameters:
entry
- the catalog entrytime
- the timestamp.
-
-
Method Details
-
etag
The resource etag. See https://en.wikipedia.org/wiki/HTTP_ETag- Returns:
- The resource etag, or null if no etag is available.
-
contentType
The resource content type.- Returns:
- The content type, or null if the content type is unknown.
-
location
The location If the resource was redirected, this method returns the redirected location.- Returns:
- The redirected location or the original URI if no redirection occurred.
-
toString
A string representation for the entry.
-