1 19 20 21 package org.netbeans.modules.javacore.scanning; 22 23 import java.io.InputStream ; 24 import java.util.ArrayList ; 25 import java.util.List ; 26 import java.util.zip.ZipEntry ; 27 import java.util.zip.ZipFile ; 28 29 33 class ZipDirInfo implements FileInfo { 34 private List files=new ArrayList (); 35 private String name; 36 private String path; 37 38 public ZipDirInfo(String p,String n) { 39 name=n; 40 path=p; 41 } 42 43 public InputStream getInputStream() { 44 throw new UnsupportedOperationException (); 45 } 46 47 public String getName() { 48 return name; 49 } 50 51 public String getPath() { 52 return path; 53 } 54 55 public boolean isDirectory() { 56 return true; 57 } 58 59 public long lastModified() { 60 throw new UnsupportedOperationException (); 61 } 62 63 public FileInfo[] listFiles() { 64 return (FileInfo[])files.toArray(new FileInfo[files.size()]); 65 } 66 67 void addEntry(ZipFile file,ZipEntry entry,String shortName, String pathName) { 68 files.add(new ZipEntryInfo(file,entry,shortName, pathName)); 69 } 70 71 void addDir(ZipDirInfo dirInfo) { 72 files.add(dirInfo); 73 } 74 75 public String getCanonicalName() { 76 return null; 77 } 78 } 79 | Popular Tags |