Package java.util.zip

Examples of java.util.zip.ZipOutputStream.finish()


        log.debug( "Starting to process export" );
        ZipOutputStream zout = new ZipOutputStream( res.getOutputStream() );
        zout.putNextEntry( new ZipEntry( "repository_export.xml" ) );
        getFileManager().exportRulesRepository( zout );
        zout.closeEntry();
        zout.finish();
        res.getOutputStream().flush();
        log.debug( "Done exporting!" );
    }

    private void processExportPackageFromRepositoryDownload(
View Full Code Here


        if (inPlaceConfUtil.isInPlaceConfiguration(dir)) {
            dir = inPlaceConfUtil.readInPlaceLocation(dir);
            writeToZip(dir, out, "", buf);
        }
        out.closeEntry();
        out.finish();
        out.flush();
    }

    private void writeToZip(File dir, ZipOutputStream out, String prefix, byte[] buf) throws IOException {
        File[] all = dir.listFiles();
View Full Code Here

        ZipOutputStream zout = new ZipOutputStream( bout );

        zout.putNextEntry( new ZipEntry( "repository_export.xml" ) );
        zout.write( dumpRepositoryXml() );
        zout.closeEntry();
        zout.finish();
        return bout.toByteArray();
    }

    public byte[] dumpRepositoryXml() throws PathNotFoundException,
                                     IOException,
View Full Code Here

        log.debug("Starting to process export");
        ZipOutputStream zout = new ZipOutputStream(res.getOutputStream());
        zout.putNextEntry(new ZipEntry("repository_export.xml"));
        fileManagerService.exportRulesRepository(zout);
        zout.closeEntry();
        zout.finish();
        res.getOutputStream().flush();
        log.debug("Done exporting!");
    }

    private void processExportPackageFromRepositoryDownload(
View Full Code Here

        ZipOutputStream zout = new ZipOutputStream( bout );

        zout.putNextEntry( new ZipEntry( "repository_export.xml" ) );
        zout.write( dumpPackageFromRepositoryXml( packageName ) );
        zout.closeEntry();
        zout.finish();
        return bout.toByteArray();
    }


View Full Code Here

    int c;
    while ((c = in.read()) != -1)
      out.write(c);
    in.close();

    out.finish();
    out.close();
  }

  /**
   * Copy a local file to HDFS
View Full Code Here

      serializer.serialize(artifactMap.get(name), zip);

      zip.closeEntry();
    }
   
    zip.finish();
    zip.flush();
  }
}
View Full Code Here

    ZipOutputStream zoutp = new ZipOutputStream(baos);
    zoutp.putNextEntry(new ZipEntry("zippedfile"));
    while((byteCount = inIPS.read(data,0,ZIP_BUFFER)) != -1 ) {
      zoutp.write(data,0,byteCount);
    }
    zoutp.finish();
    zoutp.flush();
    zoutp.close();
    baos.flush();
    baos.close();
    contentLength = (long)baos.size();
View Full Code Here

//      IOUtils.write(classFile, );
      System.out.println("Created " + className + FILE_EXTENSION_JAVA);
//      System.out.println("Contract for " + className);
//      System.out.println(type.toContract() + "\n\n");
    }
    out.finish();
    return outputStream;
//    System.out.println("\nFinished creating java classes.  Your files are located in " + zipFile.getAbsolutePath() );

  }
View Full Code Here

               zos.closeEntry();
            }
         }
         zos.flush();
         zos.finish();
      }
      catch (Throwable t)
      {
         throw new BindingException("Exception writing data to zip.", t);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.