Code example for ZipInputStream

Methods: close

                log.debug("Not a process archive");
                return "Not a process archive"; 
            try { 
                log.debug("Deploying process archive " + fileItem.getName());
                ZipInputStream zipInputStream = new ZipInputStream(fileItem.getInputStream());
                JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
                log.debug("Preparing to parse process archive");
                ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zipInputStream);
                log.debug("Created a processdefinition : " + processDefinition.getName());
                return "Deployed archive " + processDefinition.getName() + " successfully";
            } catch (IOException e) {
                log.debug("Failed to read process archive", e);
                return "IOException"; 
        } catch (FileUploadException e) {
            log.debug("Failed to parse HTTP request", e);
            return "FileUploadException"; 
Stop searching for code, let great code find you!  Add Codota to your java IDE