org.apache.naming.resources

## Class FileDirContext.FileResourceAttributes

- java.lang.Object
- - org.apache.naming.resources.ResourceAttributes
  - - org.apache.naming.resources.FileDirContext.FileResourceAttributes

- All Implemented Interfaces:
    Serializable, Cloneable, Attributes
  Enclosing class:
    FileDirContext

      protected static 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).
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `accessed`
    `protected String` | `canonicalPath`
    `protected File` | `file`

    - ### 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_LENGTH, CONTENT_TYPE, contentLength, creation, CREATION_DATE, creationDate, ETAG, format, formats, gmtZone, LAST_MODIFIED, lastModified, lastModifiedDate, lastModifiedHttp, mimeType, name, NAME, strongETag, TYPE, weakETag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileDirContext.FileResourceAttributes(File file)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCanonicalPath()` Get canonical path.
    `long` | `getContentLength()` Get content length.
    `long` | `getCreation()` Get creation time.
    `Date` | `getCreationDate()` Get creation date.
    `long` | `getLastModified()` Get last modified time.
    `Date` | `getLastModifiedDate()` Get lastModified date.
    `String` | `getName()` Get name.
    `String` | `getResourceType()` Get resource type.
    `boolean` | `isCollection()` Is collection.

    - ### Methods inherited from class org.apache.naming.resources.ResourceAttributes

      `clone, get, getAll, getETag, getIDs, getLastModifiedHttp, getMimeType, isCaseIgnored, put, put, remove, setCollection, setContentLength, setCreation, setCreationDate, setETag, setLastModified, setLastModifiedDate, setLastModifiedHttp, setMimeType, setName, setResourceType, size`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### file

          protected File file

    - #### accessed

          protected boolean accessed

    - #### canonicalPath

          protected String canonicalPath

  - ### Constructor Detail

    - #### FileDirContext.FileResourceAttributes

          public FileDirContext.FileResourceAttributes(File file)

  - ### Method Detail

    - #### isCollection

          public boolean isCollection()

      Is collection.
      Overrides:
        `isCollection` in class `ResourceAttributes`

    - #### getContentLength

          public long getContentLength()

      Get content length.
      Overrides:
        `getContentLength` in class `ResourceAttributes`
      Returns:
        content length value

    - #### getCreation

          public long getCreation()

      Get creation time.
      Overrides:
        `getCreation` in class `ResourceAttributes`
      Returns:
        creation time value

    - #### getCreationDate

          public Date getCreationDate()

      Get creation date.
      Overrides:
        `getCreationDate` in class `ResourceAttributes`
      Returns:
        Creation date value

    - #### getLastModified

          public long getLastModified()

      Get last modified time.
      Overrides:
        `getLastModified` in class `ResourceAttributes`
      Returns:
        lastModified time value

    - #### getLastModifiedDate

          public Date getLastModifiedDate()

      Get lastModified date.
      Overrides:
        `getLastModifiedDate` in class `ResourceAttributes`
      Returns:
        LastModified date value

    - #### getName

          public String getName()

      Get name.
      Overrides:
        `getName` in class `ResourceAttributes`
      Returns:
        Name value

    - #### getResourceType

          public String getResourceType()

      Get resource type.
      Overrides:
        `getResourceType` in class `ResourceAttributes`
      Returns:
        String resource type

    - #### getCanonicalPath

          public String getCanonicalPath()

      Get canonical path.
      Overrides:
        `getCanonicalPath` in class `ResourceAttributes`
      Returns:
        String the file's canonical path

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.