net.sf.xsltmp.util
Class FileCache

java.lang.Object
  extended by net.sf.xsltmp.util.FileCache

public class FileCache
extends Object

Stores processed contents of files in a file cache to prevent duplicate processing.


Constructor Summary
FileCache(org.apache.maven.plugin.logging.Log log, File rebaseTo, File storeAt, String encoding)
          Create file cache.
 
Method Summary
 Reader retrieve(File sourceFile)
          Retrieve the processed content of a file.
 void store(Reader contentReader, File sourceFile)
          Store the processed content of the source file in the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCache

public FileCache(org.apache.maven.plugin.logging.Log log,
                 File rebaseTo,
                 File storeAt,
                 String encoding)
Create file cache.

Parameters:
log - Maven log
rebaseTo - Directory against which to re-base the names of files
storeAt - Directory where to store the processed contents of the files
encoding - Encoding to use for the cache files
Method Detail

store

public void store(Reader contentReader,
                  File sourceFile)
Store the processed content of the source file in the cache.

Parameters:
contentReader - Reader of the processed content
sourceFile - The source file (that was processed)

retrieve

public Reader retrieve(File sourceFile)
Retrieve the processed content of a file.

Parameters:
sourceFile - The file whose processed content to retrieve
Returns:
A Reader for the processed content of the file


Copyright © 2008-2010 SEAF. All Rights Reserved.