org.apache.naming.resources

Class FileDirContext.FileResourceAttributes

protected class FileDirContext.FileResourceAttributes extends ResourceAttributes

This specialized resource attribute implementation does some lazy reading (to speed up simple checks, like checking the last modified date).
Field Summary
protected booleanaccessed
protected StringcanonicalPath
protected Filefile
Constructor Summary
FileResourceAttributes(File file)
Method Summary
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.

Field Detail

accessed

protected boolean accessed

canonicalPath

protected String canonicalPath

file

protected File file

Constructor Detail

FileResourceAttributes

public FileResourceAttributes(File file)

Method Detail

getCanonicalPath

public String getCanonicalPath()
Get canonical path.

Returns: String the file's canonical path

getContentLength

public long getContentLength()
Get content length.

Returns: content length value

getCreation

public long getCreation()
Get creation time.

Returns: creation time value

getCreationDate

public Date getCreationDate()
Get creation date.

Returns: Creation date value

getLastModified

public long getLastModified()
Get last modified time.

Returns: lastModified time value

getLastModifiedDate

public Date getLastModifiedDate()
Get lastModified date.

Returns: LastModified date value

getName

public String getName()
Get name.

Returns: Name value

getResourceType

public String getResourceType()
Get resource type.

Returns: String resource type

isCollection

public boolean isCollection()
Is collection.
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.