net.sf.retrotranslator.transformer
Class FolderFileContainer

java.lang.Object
  extended by net.sf.retrotranslator.transformer.FileContainer
      extended by net.sf.retrotranslator.transformer.FolderFileContainer

 class FolderFileContainer
extends FileContainer

Author:
Taras Puchko

Nested Class Summary
private static class FolderFileContainer.FolderFileEntry
           
 
Field Summary
private  java.util.Map<java.lang.String,FolderFileContainer.FolderFileEntry> entries
           
 
Fields inherited from class net.sf.retrotranslator.transformer.FileContainer
location
 
Constructor Summary
FolderFileContainer(java.io.File location)
           
FolderFileContainer(java.io.File location, java.util.List<java.lang.String> fileNames)
           
 
Method Summary
 boolean containsUpToDate(java.lang.String name, long sourceTime)
           
 void flush(SystemLogger logger)
           
 java.util.Collection<? extends FileEntry> getEntries()
           
private  void initEntries()
           
 long lastModified()
           
 void putEntry(java.lang.String name, byte[] contents, boolean modified)
           
 void removeEntry(java.lang.String name)
           
private  void scanFolder(java.io.File folder, int prefixLength)
           
 
Methods inherited from class net.sf.retrotranslator.transformer.FileContainer
getFileCount, getLocation, readFully, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

entries

private java.util.Map<java.lang.String,FolderFileContainer.FolderFileEntry> entries
Constructor Detail

FolderFileContainer

public FolderFileContainer(java.io.File location)

FolderFileContainer

public FolderFileContainer(java.io.File location,
                           java.util.List<java.lang.String> fileNames)
Method Detail

getEntries

public java.util.Collection<? extends FileEntry> getEntries()
Specified by:
getEntries in class FileContainer

removeEntry

public void removeEntry(java.lang.String name)
Specified by:
removeEntry in class FileContainer

scanFolder

private void scanFolder(java.io.File folder,
                        int prefixLength)

putEntry

public void putEntry(java.lang.String name,
                     byte[] contents,
                     boolean modified)
Specified by:
putEntry in class FileContainer

initEntries

private void initEntries()

flush

public void flush(SystemLogger logger)
Specified by:
flush in class FileContainer

containsUpToDate

public boolean containsUpToDate(java.lang.String name,
                                long sourceTime)
Specified by:
containsUpToDate in class FileContainer

lastModified

public long lastModified()
Specified by:
lastModified in class FileContainer