org.apache.http.impl.client.cache
Class FileResourceFactory

java.lang.Object
  extended by org.apache.http.impl.client.cache.FileResourceFactory
All Implemented Interfaces:
ResourceFactory

@Immutable
public class FileResourceFactory
extends Object
implements ResourceFactory

Generates Resource instances whose body is stored in a temporary file.

Since:
4.1

Constructor Summary
FileResourceFactory(File cacheDir)
           
 
Method Summary
 Resource copy(String requestId, Resource resource)
           
 Resource generate(String requestId, InputStream instream, InputLimit limit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileResourceFactory

public FileResourceFactory(File cacheDir)
Method Detail

generate

public Resource generate(String requestId,
                         InputStream instream,
                         InputLimit limit)
                  throws IOException
Specified by:
generate in interface ResourceFactory
Throws:
IOException

copy

public Resource copy(String requestId,
                     Resource resource)
              throws IOException
Specified by:
copy in interface ResourceFactory
Throws:
IOException


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