Package org.apache.naming.resources
Class WebDirContext.JarResourceAttributes
- java.lang.Object
-
- org.apache.naming.resources.ResourceAttributes
-
- org.apache.naming.resources.WebDirContext.JarResourceAttributes
-
- All Implemented Interfaces:
Serializable,Cloneable,Attributes
- Enclosing class:
- WebDirContext
protected static class WebDirContext.JarResourceAttributes extends ResourceAttributes
This specialized resource attribute implementation does some lazy reading (to speed up simple checks, like checking the last modified date).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanaccessedprotected JarEntryjarEntry-
Fields inherited from class org.apache.naming.resources.ResourceAttributes
ALTERNATE_CONTENT_LENGTH, ALTERNATE_CREATION_DATE, ALTERNATE_ETAG, ALTERNATE_LAST_MODIFIED, ALTERNATE_TYPE, attributes, collection, COLLECTION_TYPE, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, contentLength, creation, CREATION_DATE, creationDate, ETAG, FORMAT, FORMATS, gmtZone, LAST_MODIFIED, lastModified, lastModifiedDate, lastModifiedHttp, mimeType, name, NAME, SOURCE, strongETag, TYPE, weakETag
-
-
Constructor Summary
Constructors Constructor Description JarResourceAttributes(JarEntry jarEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCanonicalPath()Get canonical path.longgetContentLength()Get content length.longgetCreation()Get creation time.DategetCreationDate()Get creation date.longgetLastModified()Get last modified time.DategetLastModifiedDate()Get lastModified date.StringgetName()Get name.StringgetResourceType()Get resource type.booleanisCollection()Is collection.-
Methods inherited from class org.apache.naming.resources.ResourceAttributes
clone, get, getAll, getCreationOrLastModifiedDate, getETag, getETag, getIDs, getLastModifiedHttp, getMimeType, isCaseIgnored, isMimeTypeInitialized, put, put, remove, setCollection, setContentLength, setCreation, setCreationDate, setETag, setLastModified, setLastModified, setLastModifiedDate, setLastModifiedHttp, setMimeType, setName, setResourceType, size
-
-
-
-
Field Detail
-
jarEntry
protected transient JarEntry jarEntry
-
accessed
protected boolean accessed
-
-
Constructor Detail
-
JarResourceAttributes
public JarResourceAttributes(JarEntry jarEntry)
-
-
Method Detail
-
isCollection
public boolean isCollection()
Is collection.- Overrides:
isCollectionin classResourceAttributes
-
getContentLength
public long getContentLength()
Get content length.- Overrides:
getContentLengthin classResourceAttributes- Returns:
- content length value
-
getCreation
public long getCreation()
Get creation time.- Overrides:
getCreationin classResourceAttributes- Returns:
- creation time value
-
getCreationDate
public Date getCreationDate()
Get creation date.- Overrides:
getCreationDatein classResourceAttributes- Returns:
- Creation date value
-
getLastModified
public long getLastModified()
Get last modified time.- Overrides:
getLastModifiedin classResourceAttributes- Returns:
- lastModified time value
-
getLastModifiedDate
public Date getLastModifiedDate()
Get lastModified date.- Overrides:
getLastModifiedDatein classResourceAttributes- Returns:
- LastModified date value
-
getName
public String getName()
Get name.- Overrides:
getNamein classResourceAttributes- Returns:
- Name value
-
getResourceType
public String getResourceType()
Get resource type.- Overrides:
getResourceTypein classResourceAttributes- Returns:
- String resource type
-
getCanonicalPath
public String getCanonicalPath()
Get canonical path.- Overrides:
getCanonicalPathin classResourceAttributes- Returns:
- String the file's canonical path
-
-