Code example for ZipFile

Methods: close, getEntry, getInputStream

0
	} 
 
	public ChecklistEdition(String editionId, ZipFile projectZip) throws Exception {
		this.editionId = editionId;
		 
		InputStream packageStream = projectZip.getInputStream(projectZip.getEntry("package.xml"));
        // Get SAX Parser Factory 
        SAXParserFactory factory = SAXParserFactory.newInstance();
 
        // Get SAX Parser in vendor-neutral way 
        SAXParser parser = factory.newSAXParser();
 
        // Parse an XML file using a custom MyHandler instance 
        parser.parse(packageStream, this);
         
        try {projectZip.close();} catch(Exception exc) {};
	} 
 
	/* (non-Javadoc) 
	 * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) 
	 */