Home » openjdk-7 » com.sun.tools » javac » zip » [javadoc | source]
public class: ZipFileIndex [javadoc | source]
This class implements building of index of a zip archive and access to it's context. It also uses prebuild index if available. It supports invocations where it will serialize an optimized zip index file to disk. In oreder to use secondary index file make sure the option "usezipindex" is in the Options object, when JavacFileManager is invoked. (You can pass "-XDusezipindex" on the command line. Location where to look for/generate optimized zip index files can be provided using "-XDcachezipindexdir=". If this flag is not provided, the dfault location is the value of the "java.io.tmpdir" system property. If key "-XDwritezipindexfiles" is specified, there will be new optimized index file created for each archive, used by the compiler for compilation, at location, specified by "cachezipindexdir" option. If nonBatchMode option is specified (-XDnonBatchMode) the compiler will use timestamp checking to reindex the zip files if it is needed. In batch mode the timestamps are not checked and the compiler uses the cached indexes.
Nested Class Summary:
static class  ZipFileIndex.DirectoryEntry  ------------------------------------------------------------------------ DirectoryEntry class ------------------------------------------------------------------------- 
Field Summary
public static final  long NOT_MODIFIED     
Method from com.sun.tools.javac.zip.ZipFileIndex Summary:
clearCache,   clearCache,   close,   contains,   finalize,   getAllDirectories,   getAllDirectories,   getExistingZipIndex,   getFiles,   getLastModified,   getZipFile,   getZipFileIndex,   getZipFileIndexes,   getZipFileIndexes,   getZipFileLastModified,   getZipIndexEntry,   isDirectory,   isOpen,   length,   read,   read,   read,   read,   removeFromCache,   setOpenedIndexes,   toString,   writeZipIndex
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.zip.ZipFileIndex Detail:
 public static  void clearCache() 
 public static  void clearCache(long timeNotUsed) 
 public  void close() 
 public boolean contains(String path) 
    Tests if a specific path exists in the zip. This method will return true for file entries and directories.
 protected  void finalize() 
 public Set<String> getAllDirectories() 
 public List<String> getAllDirectories(String path) 
 public static ZipFileIndex getExistingZipIndex(File zipFile) 
 public List<String> getFiles(String path) 
    Returns a javac List of filenames within an absolute path in the ZipFileIndex.
 public long getLastModified(String path) throws IOException 
 public File getZipFile() 
 public static ZipFileIndex getZipFileIndex(File zipFile,
    int symbolFilePrefixLen,
    boolean useCache,
    String cacheLocation,
    boolean writeIndex) throws IOException 
 public static List<ZipFileIndex> getZipFileIndexes() 
    Returns a list of all ZipFileIndex entries
 public static List<ZipFileIndex> getZipFileIndexes(boolean openedOnly) 
    Returns a list of all ZipFileIndex entries
 public long getZipFileLastModified() throws IOException 
    Returns the last modified timestamp of a zip file.
 public ZipFileIndexEntry getZipIndexEntry(String path) 
    Returns the ZipFileIndexEntry for an absolute path, if there is one.
 public boolean isDirectory(String path) throws IOException 
 public boolean isOpen() 
 public int length(String path) throws IOException 
 public byte[] read(String path) throws IOException 
 public byte[] read(ZipFileIndexEntry entry) throws IOException 
 public int read(String path,
    byte[] buffer) throws IOException 
 public int read(ZipFileIndexEntry entry,
    byte[] buffer) throws IOException 
 public static  void removeFromCache(File file) 
 public static  void setOpenedIndexes(List<ZipFileIndex> indexes) throws IllegalStateException 
    Sets already opened list of ZipFileIndexes from an outside client of the compiler. This functionality should be used in a non-batch clients of the compiler.
 public String toString() 
 public boolean writeZipIndex()