/** * Public constructor. * @param archiveStream Archive stream containing initial archive entries. * @throws IOException Error reading from zip stream. */ public Archive(ZipInputStream archiveStream) throws IOException { this.archiveName = "Unknown"; createTempDir(); addEntries(archiveStream); }
/** * Public constructor. */ public Archive() { this.archiveName = "Unknown"; createTempDir(); }
@Override protected URL findResource(String resName) { URL resource = archive.getEntryURL(resName); if (resource != null) { return resource; } return getParent().getResource(resName); }
private static Archive loadArchive(InputStream rawStream) { try { return new Archive(new ZipInputStream(rawStream)); } catch(Exception e) { // Assume it's not a Zip file. Just return null... return null; } }
/** * Public constructor. * @param archiveStream Archive stream containing initial archive entries. * @throws IOException Error reading from zip stream. */ public Archive(ZipInputStream archiveStream) throws IOException { this.archiveName = "Unknown"; createTempDir(); addEntries(archiveStream); }
@Override protected URL findResource(String resName) { URL resource = archive.getEntryURL(resName); if (resource != null) { return resource; } return getParent().getResource(resName); }
private static Archive loadArchive(InputStream rawStream) { try { return new Archive(new ZipInputStream(rawStream)); } catch(Exception e) { // Assume it's not a Zip file. Just return null... return null; } }
/** * Public constructor. */ public Archive() { this.archiveName = "Unknown"; createTempDir(); }
/** * Public constructor. * @param archiveStream Archive stream containing initial archive entries. * @throws IOException Error reading from zip stream. */ public Archive(ZipInputStream archiveStream) throws IOException { this.archiveName = "Unknown"; createTempDir(); addEntries(archiveStream); }
@Override protected URL findResource(String resName) { URL resource = archive.getEntryURL(resName); if (resource != null) { return resource; } return getParent().getResource(resName); }
private static Archive loadArchive(InputStream rawStream) { try { return new Archive(new ZipInputStream(rawStream)); } catch(Exception e) { // Assume it's not a Zip file. Just return null... return null; } }
/** * Public constructor. */ public Archive() { this.archiveName = "Unknown"; createTempDir(); }
/** * Public constructor. * @param archiveName The archive name of the deployment. * @param archiveStream Archive stream containing initial archive entries. * @throws IOException Error reading from zip stream. */ public Archive(String archiveName, ZipInputStream archiveStream) throws IOException { AssertArgument.isNotNullAndNotEmpty(archiveName, "archiveName"); this.archiveName = archiveName; createTempDir(); addEntries(archiveStream); }
@Override protected Enumeration<URL> findResources(String resName) throws IOException { List<URL> resources = new ArrayList<URL>(); URL resource = archive.getEntryURL(resName); if (resource != null) { resources.add(resource); } Enumeration<URL> parentResource = getParent().getResources(resName); resources.addAll(Collections.list(parentResource)); return Collections.enumeration(resources); } }
private static Archive loadArchive(InputStream rawStream) { try { return new Archive(new ZipInputStream(rawStream)); } catch(Exception e) { // Assume it's not a Zip file. Just return null... return null; } }
/** * Public constructor. * @param archiveName The archive name of the deployment. */ public Archive(String archiveName) { AssertArgument.isNotNull(archiveName, "archiveName"); this.archiveName = archiveName; createTempDir(); }
/** * Public constructor. * @param archiveName The archive name of the deployment. * @param archiveStream Archive stream containing initial archive entries. * @throws IOException Error reading from zip stream. */ public Archive(String archiveName, ZipInputStream archiveStream) throws IOException { AssertArgument.isNotNullAndNotEmpty(archiveName, "archiveName"); this.archiveName = archiveName; createTempDir(); addEntries(archiveStream); }
/** * Public constructor. * @param archiveName The archive name of the deployment. */ public Archive(String archiveName) { AssertArgument.isNotNull(archiveName, "archiveName"); this.archiveName = archiveName; createTempDir(); }
/** * Public constructor. * @param archiveName The archive name of the deployment. * @param archiveStream Archive stream containing initial archive entries. * @throws IOException Error reading from zip stream. */ public Archive(String archiveName, ZipInputStream archiveStream) throws IOException { AssertArgument.isNotNullAndNotEmpty(archiveName, "archiveName"); this.archiveName = archiveName; createTempDir(); addEntries(archiveStream); }
/** * Public constructor. * @param archiveName The archive name of the deployment. */ public Archive(String archiveName) { AssertArgument.isNotNull(archiveName, "archiveName"); this.archiveName = archiveName; createTempDir(); }