FileDirContext.FileResource (Apache Tomcat 7.0.76 API Documentation)

org.apache.naming.resources

## Class FileDirContext.FileResource

- java.lang.Object
- - org.apache.naming.resources.Resource
  - - org.apache.naming.resources.FileDirContext.FileResource

- Enclosing class:
    FileDirContext

      protected static class FileDirContext.FileResource
      extends Resource

  This specialized resource implementation avoids opening the InputStream to the file right away (which would put a lock on the file).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected File` | `file` Associated file object.

    - ### Fields inherited from class org.apache.naming.resources.Resource

      `binaryContent, inputStream`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `InputStream` | `streamContent()` Content accessor.

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

      `getContent, setContent, setContent`

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

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

- - ### Field Detail

    - #### file

          protected File file

      Associated file object.

  - ### Constructor Detail

    - #### FileDirContext.FileResource

          public FileDirContext.FileResource(File file)

  - ### Method Detail

    - #### streamContent

          public InputStream streamContent()
                                    throws IOException

      Content accessor.
      Overrides:
        `streamContent` in class `Resource`
      Returns:
        InputStream
      Throws:
        `IOException`

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