Package java.util.zip

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


                  outEntry.setCrc( crc.getValue() );
                  outEntry.setCompressedSize( byteCode.length );
                }
                out.putNextEntry( outEntry );
                out.write( byteCode );
                out.closeEntry();
          }
        };
        ZipFileProcessor processor = new ZipFileProcessor( transformer );
        processor.process( file );
        out.close();
View Full Code Here


                  outEntry.setCrc( crc.getValue() );
                  outEntry.setCompressedSize( byteCode.length );
                }
                out.putNextEntry( outEntry );
                out.write( byteCode );
                out.closeEntry();
          }
        };
        ZipFileProcessor processor = new ZipFileProcessor( transformer );
        processor.process( file );
        out.close();
View Full Code Here

                  outEntry.setCrc( crc.getValue() );
                  outEntry.setCompressedSize( byteCode.length );
                }
                out.putNextEntry( outEntry );
                out.write( byteCode );
                out.closeEntry();
          }
        };
        ZipFileProcessor processor = new ZipFileProcessor( transformer );
        processor.process( file );
        out.close();
View Full Code Here

        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        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 len;
            while ((len = is.read(InputData)) != EOF)
            {
               zos.write(InputData, 0, len);
            }
            zos.closeEntry();
         }
         else if (di instanceof FileDataInstance)
         {
            di.getZipOut(true, zos);
         }
View Full Code Here

            byte InputData[] = new byte[BUFFER];
            while ((len = is.read(InputData)) != EOF)
            {
               zos.write(InputData, 0, len);
            }
            zos.closeEntry();
         }
         else if (di instanceof FileDataInstance)
         {
            di.setType("Zip");
            InputStream is = di.getInputStream();
View Full Code Here

      inDocHandler.endElement( "", "classes", "classes");
      inDocHandler.endDocument();
    }

    if( outRepresentation==SINGLE_XML) {
      zos.closeEntry();
    }
    zos.flush();
    zos.close();
   
    return n;
View Full Code Here

            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            ZipOutputStream zos = new ZipOutputStream(bos);
            ZipEntry entry = new ZipEntry("myFile");
            zos.putNextEntry(entry);
            zos.write(dataBytes);
            zos.closeEntry();
            zos.close();
            zipBytes = bos.toByteArray();
        } catch (Exception e) {
            System.out.println("Exception during ZipFile setup:");
            e.printStackTrace();
View Full Code Here

            OutputStreamWriter writer = new OutputStreamWriter(zos);
            for (ObjectSpecification objectSpec : domainObjectSpecs) {
                zos.putNextEntry(new ZipEntry(zipEntryNameFor(objectSpec)));
                writer.write(propertiesReader.asJson(objectSpec));
                writer.flush();
                zos.closeEntry();
            }
            writer.close();
            return new Blob("layouts.zip", mimeTypeApplicationZip, baos.toByteArray());
        } catch (final IOException ex) {
            throw new FatalException("Unable to create zip of layouts", ex);
View Full Code Here

            OutputStreamWriter writer = new OutputStreamWriter(zos);
            for (ObjectSpecification objectSpec : domainObjectSpecs) {
                zos.putNextEntry(new ZipEntry(zipEntryNameFor(objectSpec)));
                writer.write(propertiesReader.asJson(objectSpec));
                writer.flush();
                zos.closeEntry();
            }
            writer.close();
            return new Blob("layouts.zip", mimeTypeApplicationZip, baos.toByteArray());
        } catch (final IOException ex) {
            throw new FatalException("Unable to create zip of layouts", ex);
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.