Package org.xmlresolver.cache
Class CacheEntry
- java.lang.Object
-
- org.xmlresolver.cache.CacheEntry
-
public class CacheEntry extends java.lang.Object
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 Modifier and Type Field Description org.xmlresolver.catalog.entry.Entry
entry
The XML Catalog entry for this cached resource.boolean
expired
Is this resource expired?java.io.File
file
The local file where this resource is cached.long
time
The date when the resource was cached.java.net.URI
uri
The URI of the resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
contentType()
The resource content type.java.lang.String
etag()
The resource etag.java.net.URI
location()
The location If the resource was redirected, this method returns the redirected location.java.lang.String
toString()
A string representation for the entry.
-
-
-
Field Detail
-
entry
public final org.xmlresolver.catalog.entry.Entry entry
The XML Catalog entry for this cached resource.
-
uri
public final java.net.URI uri
The URI of the resource.
-
file
public final java.io.File file
The local file where this resource is cached.
-
time
public final long time
The date when the resource was cached.
-
expired
public boolean expired
Is this resource expired?
-
-
Method Detail
-
etag
public java.lang.String etag()
The resource etag. See https://en.wikipedia.org/wiki/HTTP_ETag- Returns:
- The resource etag, or null if no etag is available.
-
contentType
public java.lang.String contentType()
The resource content type.- Returns:
- The content type, or null if the content type is unknown.
-
location
public java.net.URI 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
public java.lang.String toString()
A string representation for the entry.- Overrides:
toString
in classjava.lang.Object
-
-