Package java.util.zip

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


        zout.setMethod(ZipOutputStream.DEFLATED);
        try {
            int pos = contentNode.getPath().length();
            exportZipEntry(context, zout, contentNode, pos > 1 ? pos+1 : pos);
        } finally {
            zout.finish();
        }
    }

    /**
     * If the specified node is the defined non-collection nodetype a new
View Full Code Here


    final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    final ZipOutputStream zip = new ZipOutputStream(buffer);
    zip.putNextEntry(new ZipEntry(
        "org/jacoco/core/analysis/AnalyzerTest.class"));
    zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
    zip.finish();
    final int count = analyzer.analyzeArchive(new ByteArrayInputStream(
        buffer.toByteArray()));
    assertEquals(1, count);
    assertEquals(
        Collections.singleton("org/jacoco/core/analysis/AnalyzerTest"),
View Full Code Here

    final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    final ZipOutputStream zip = new ZipOutputStream(buffer);
    zip.putNextEntry(new ZipEntry(
        "org/jacoco/core/analysis/AnalyzerTest.class"));
    zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
    zip.finish();
    final int count = analyzer.analyzeAll(new ByteArrayInputStream(buffer
        .toByteArray()));
    assertEquals(1, count);
    assertEquals(
        Collections.singleton("org/jacoco/core/analysis/AnalyzerTest"),
View Full Code Here

    final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    final ZipOutputStream zip = new ZipOutputStream(buffer);
    zip.putNextEntry(new ZipEntry(
        "org/jacoco/core/instr/AnalyzerTest.class"));
    zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
    zip.finish();
    final int count = analyzer.analyzeArchive(new ByteArrayInputStream(
        buffer.toByteArray()));
    assertEquals(1, count);
    assertEquals(Collections
        .singleton("org/jacoco/core/instr/AnalyzerTest"), classes);
View Full Code Here

    final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    final ZipOutputStream zip = new ZipOutputStream(buffer);
    zip.putNextEntry(new ZipEntry(
        "org/jacoco/core/instr/AnalyzerTest.class"));
    zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
    zip.finish();
    final int count = analyzer.analyzeAll(new ByteArrayInputStream(buffer
        .toByteArray()));
    assertEquals(1, count);
    assertEquals(Collections
        .singleton("org/jacoco/core/instr/AnalyzerTest"), classes);
View Full Code Here

    final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    final ZipOutputStream zip = new ZipOutputStream(buffer);
    zip.putNextEntry(new ZipEntry(
        "org/jacoco/core/analysis/AnalyzerTest.class"));
    zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
    zip.finish();
    final int count = analyzer.analyzeArchive(new ByteArrayInputStream(
        buffer.toByteArray()));
    assertEquals(1, count);
    assertEquals(
        Collections.singleton("org/jacoco/core/analysis/AnalyzerTest"),
View Full Code Here

    final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    final ZipOutputStream zip = new ZipOutputStream(buffer);
    zip.putNextEntry(new ZipEntry(
        "org/jacoco/core/analysis/AnalyzerTest.class"));
    zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
    zip.finish();
    final int count = analyzer.analyzeAll(new ByteArrayInputStream(buffer
        .toByteArray()));
    assertEquals(1, count);
    assertEquals(
        Collections.singleton("org/jacoco/core/analysis/AnalyzerTest"),
View Full Code Here

    final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    final ZipOutputStream zip = new ZipOutputStream(buffer);
    zip.putNextEntry(new ZipEntry(
        "org/jacoco/core/instr/AnalyzerTest.class"));
    zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
    zip.finish();
    final int count = analyzer.analyzeArchive(new ByteArrayInputStream(
        buffer.toByteArray()));
    assertEquals(1, count);
    assertEquals(Collections
        .singleton("org/jacoco/core/instr/AnalyzerTest"), classes);
View Full Code Here

    final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    final ZipOutputStream zip = new ZipOutputStream(buffer);
    zip.putNextEntry(new ZipEntry(
        "org/jacoco/core/instr/AnalyzerTest.class"));
    zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
    zip.finish();
    final int count = analyzer.analyzeAll(new ByteArrayInputStream(buffer
        .toByteArray()));
    assertEquals(1, count);
    assertEquals(Collections
        .singleton("org/jacoco/core/instr/AnalyzerTest"), classes);
View Full Code Here

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

      zip.closeEntry();
    }
   
    zip.finish();
    zip.flush();
  }
 
  @SuppressWarnings("unchecked")
  public <T> T getArtifact(String key) {
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.