148 |
148 |
149 fsInfo = FSInfo.instance(context); |
149 fsInfo = FSInfo.instance(context); |
150 |
150 |
151 useZipFileIndex = System.getProperty("useJavaUtilZip") == null;// TODO: options.get("useJavaUtilZip") == null; |
151 useZipFileIndex = System.getProperty("useJavaUtilZip") == null;// TODO: options.get("useJavaUtilZip") == null; |
152 |
152 |
153 mmappedIO = options.get("mmappedIO") != null; |
153 mmappedIO = options.isSet("mmappedIO"); |
154 ignoreSymbolFile = options.get("ignore.symbol.file") != null; |
154 ignoreSymbolFile = options.isSet("ignore.symbol.file"); |
155 } |
155 } |
156 |
156 |
157 public JavaFileObject getFileForInput(String name) { |
157 public JavaFileObject getFileForInput(String name) { |
158 return getRegularFile(new File(name)); |
158 return getRegularFile(new File(name)); |
159 } |
159 } |
433 |
433 |
434 if (!useZipFileIndex) { |
434 if (!useZipFileIndex) { |
435 zdir = new ZipFile(zipFileName); |
435 zdir = new ZipFile(zipFileName); |
436 } |
436 } |
437 else { |
437 else { |
438 usePreindexedCache = options.get("usezipindex") != null; |
438 usePreindexedCache = options.isSet("usezipindex"); |
439 preindexCacheLocation = options.get("java.io.tmpdir"); |
439 preindexCacheLocation = options.get("java.io.tmpdir"); |
440 String optCacheLoc = options.get("cachezipindexdir"); |
440 String optCacheLoc = options.get("cachezipindexdir"); |
441 |
441 |
442 if (optCacheLoc != null && optCacheLoc.length() != 0) { |
442 if (optCacheLoc != null && optCacheLoc.length() != 0) { |
443 if (optCacheLoc.startsWith("\"")) { |
443 if (optCacheLoc.startsWith("\"")) { |
467 archive = new ZipFileIndexArchive(this, |
467 archive = new ZipFileIndexArchive(this, |
468 ZipFileIndex.getZipFileIndex(zipFileName, |
468 ZipFileIndex.getZipFileIndex(zipFileName, |
469 null, |
469 null, |
470 usePreindexedCache, |
470 usePreindexedCache, |
471 preindexCacheLocation, |
471 preindexCacheLocation, |
472 options.get("writezipindexfiles") != null)); |
472 options.isSet("writezipindexfiles"))); |
473 } |
473 } |
474 } |
474 } |
475 else { |
475 else { |
476 if (!useZipFileIndex) { |
476 if (!useZipFileIndex) { |
477 archive = new SymbolArchive(this, origZipFileName, zdir, symbolFilePrefix); |
477 archive = new SymbolArchive(this, origZipFileName, zdir, symbolFilePrefix); |
480 archive = new ZipFileIndexArchive(this, |
480 archive = new ZipFileIndexArchive(this, |
481 ZipFileIndex.getZipFileIndex(zipFileName, |
481 ZipFileIndex.getZipFileIndex(zipFileName, |
482 symbolFilePrefix, |
482 symbolFilePrefix, |
483 usePreindexedCache, |
483 usePreindexedCache, |
484 preindexCacheLocation, |
484 preindexCacheLocation, |
485 options.get("writezipindexfiles") != null)); |
485 options.isSet("writezipindexfiles"))); |
486 } |
486 } |
487 } |
487 } |
488 } catch (FileNotFoundException ex) { |
488 } catch (FileNotFoundException ex) { |
489 archive = new MissingArchive(zipFileName); |
489 archive = new MissingArchive(zipFileName); |
490 } catch (IOException ex) { |
490 } catch (IOException ex) { |