Home » openjdk-7 » com.sun.tools » javac » file » [javadoc | source]
public class: ZipFileIndex [javadoc | source]
This class implements the building of index of a zip archive and access to its context. It also uses a prebuilt index if available. It supports invocations where it will serialize an optimized zip index file to disk. In order to use a secondary index file, set "usezipindex" 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 default location is the value of the "java.io.tmpdir" system property. If "-XDwritezipindexfiles" is specified, there will be new optimized index file created for each archive, used by the compiler for compilation, at the location specified by the "cachezipindexdir" option. If system property nonBatchMode option is specified 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.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Nested Class Summary:
static class  ZipFileIndex.DirectoryEntry  ------------------------------------------------------------------------ DirectoryEntry class ------------------------------------------------------------------------- 
static class  ZipFileIndex.Entry   
static final class  ZipFileIndex.ZipFormatException   
Field Summary
public static final  long NOT_MODIFIED     
final  File zipFile     
 long zipFileLastModified     
final  RelativeDirectory symbolFilePrefix     
 long lastReferenceTimeStamp     
 ZipFileIndex(File zipFile,
    RelativeDirectory symbolFilePrefix,
    boolean writeIndex,
    boolean useCache,
    String cacheLocation) throws IOException 
Method from com.sun.tools.javac.file.ZipFileIndex Summary:
close,   contains,   finalize,   getAbsoluteFile,   getAllDirectories,   getDirectories,   getFiles,   getLastModified,   getZipFile,   getZipFileLastModified,   getZipIndexEntry,   isDirectory,   isOpen,   length,   read,   read,   read,   read,   toString,   writeZipIndex
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.file.ZipFileIndex Detail:
 public synchronized  void close() 
 public synchronized boolean contains(RelativePath path) 
    Tests if a specific path exists in the zip. This method will return true for file entries and directories.
 protected  void finalize() throws Throwable 
 File getAbsoluteFile() 
 public synchronized Set<RelativeDirectory> getAllDirectories() 
 public synchronized List<String> getDirectories(RelativeDirectory path) 
 public synchronized List<String> getFiles(RelativeDirectory path) 
    Returns a javac List of filenames within a directory in the ZipFileIndex.
 public synchronized long getLastModified(RelativeFile path) throws IOException 
 public File getZipFile() 
 public long getZipFileLastModified() throws IOException 
    Returns the last modified timestamp of a zip file.
 synchronized Entry getZipIndexEntry(RelativePath path) 
    Returns the ZipFileIndexEntry for a path, if there is one.
 public synchronized boolean isDirectory(RelativePath path) throws IOException 
 public synchronized boolean isOpen() 
 public synchronized int length(RelativeFile path) throws IOException 
 public synchronized byte[] read(RelativeFile path) throws IOException 
 synchronized byte[] read(Entry entry) throws IOException 
 public synchronized int read(RelativeFile path,
    byte[] buffer) throws IOException 
 synchronized int read(Entry entry,
    byte[] buffer) throws IOException 
 public String toString() 
 public boolean writeZipIndex()