Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.http.impl.client.cache
Class FileResource

    java.lang.Object
      org.apache.http.impl.client.cache.FileResource

All Implemented Interfaces:
  Serializable, Resource

    @ThreadSafe
    public class FileResource

extends Object
implements Resource

Cache resource backed by a file.

Since:
  4.1
See Also:
  Serialized Form

Constructor Summary
`FileResource(File file)`

Method Summary
`void` | `dispose()` Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.
`InputStream` | `getInputStream()` Returns an `InputStream` from which the response body can be read.
`long` | `length()` Returns the length in bytes of the response body.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileResource

    public FileResource(File file)

Method Detail

### getInputStream

    public InputStream getInputStream()
                               throws IOException

  Description copied from interface: `Resource`
  Returns an `InputStream` from which the response body can be read.

  Specified by:
    `getInputStream` in interface `Resource`
  Throws:
    `IOException`

### length

    public long length()

  Description copied from interface: `Resource`
  Returns the length in bytes of the response body.

  Specified by:
    `length` in interface `Resource`

### dispose

    public void dispose()

  Description copied from interface: `Resource`
  Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.

  Specified by:
    `dispose` in interface `Resource`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2013 The Apache Software Foundation. All Rights Reserved.