Examples of writeOut()


Examples of org.apache.aries.unittest.fixture.ArchiveFixture.Fixture.writeOut()

                           
            .file("OSGI-INF/blueprint/blueprint.xml", blueprint.toString())
            .end();
       
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        jar.writeOut(bout);
       
        return new ByteArrayInputStream(bout.toByteArray());
    }
   
    @Test
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.Fixture.writeOut()

                .line("<blueprint xmlns=\"http://www.osgi.org/xmlns/blueprint/v1.0.0\">")
                .line("<reference interface=\"java.util.List\" />")
                .line("</blueprint>").end().end();
       
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        jar.writeOut(bout);
       
        Bundle b = bundleContext.installBundle("test.bundle", new ByteArrayInputStream(bout.toByteArray()));
       
        for (int i=0; i<16; i++) System.gc();
        long startFreeMemory = Runtime.getRuntime().freeMemory();
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()

      .attribute(Constants.BUNDLE_SYMBOLICNAME, "aa" + n)
      .attribute(Constants.BUNDLE_MANIFESTVERSION, "2")
      .attribute(Constants.IMPORT_PACKAGE, "a.b.c, p.q.r, x.y.z, javax.naming")
      .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();
      FileOutputStream fout = new FileOutputStream(new File (tmpDir.getAbsoluteFile(), "aa" + n + ((n == 0)? ".jar": ".war")));
      bundle.writeOut(fout);
      fout.close();
    }
    File subDir = new File(tmpDir, "subDir");
    subDir.mkdirs();
    for (int n =0; n< 2; n++) {
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()

      .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();



      FileOutputStream fout = new FileOutputStream(new File (subDir.getAbsoluteFile(), "aa" + n + ((n == 0)? ".jar": ".war")));
      bundle.writeOut(fout);
      fout.close();
    }

    for (int n =0; n< 2; n++) {
      ZipFixture bundle = ArchiveFixture.newJar().manifest()
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()

      .attribute(Constants.IMPORT_PACKAGE, "a.b.c, p.q.r, x.y.z, javax.naming")
      .attribute(Constants.BUNDLE_VERSION, "1.0.0").end();


      FileOutputStream fout = new FileOutputStream(new File (tmpDir, "bb" + n + ".jar"));
      bundle.writeOut(fout);
      fout.close();
    }

    IOUtils.writeOut(tmpDir, "simple.jar", new StringBufferInputStream("abc"));
    IOUtils.writeOut(tmpDir, "simple.war", new StringBufferInputStream("sss"));
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()

                            .attribute(IMPORT_PACKAGE, "p.q.r, x.y.z, javax.naming, " + BUNDLE_IN_FRAMEWORK)
                            .attribute(BUNDLE_VERSION, "1.0.0").end();

   
    FileOutputStream fout = new FileOutputStream(CORE_BUNDLE_BY_VALUE + ".jar");
    bundle.writeOut(fout);
    fout.close();

    bundle = ArchiveFixture.newJar().manifest()
                            .attribute(BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_VALUE)
                            .attribute(BUNDLE_MANIFESTVERSION, "2")
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()

                            .attribute(BUNDLE_MANIFESTVERSION, "2")
                            .attribute(EXPORT_PACKAGE, "p.q.r")
                            .attribute(BUNDLE_VERSION, "1.0.0").end();

    fout = new FileOutputStream(TRANSITIVE_BUNDLE_BY_VALUE + ".jar");
    bundle.writeOut(fout);
    fout.close();

    bundle = ArchiveFixture.newJar().manifest()
                            .attribute(BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_REFERENCE)
                            .attribute(BUNDLE_MANIFESTVERSION, "2")
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()

                            .attribute(BUNDLE_MANIFESTVERSION, "2")
                            .attribute(EXPORT_PACKAGE, "x.y.z")
                            .attribute(BUNDLE_VERSION, "1.0.0").end();
   
    fout = new FileOutputStream(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar");
    bundle.writeOut(fout);
    fout.close();

    bundle = ArchiveFixture.newJar().manifest()
                            .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
                            .attribute(BUNDLE_MANIFESTVERSION, "2")
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()

                            .attribute(BUNDLE_MANIFESTVERSION, "2")
                            .attribute(EXPORT_PACKAGE, "d.e.f")
                            .attribute(BUNDLE_VERSION, "1.0.0").end();
   
    fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + ".jar");
    bundle.writeOut(fout);
    fout.close();

    bundle = ArchiveFixture.newJar().manifest()
                            .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
                            .attribute(BUNDLE_MANIFESTVERSION, "2")
View Full Code Here

Examples of org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture.writeOut()

                            .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
                            .attribute(BUNDLE_MANIFESTVERSION, "2")
                            .attribute(EXPORT_PACKAGE, "d.e.f").end();

    fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
    bundle.writeOut(fout);
    fout.close();
   
    ZipFixture testEba = ArchiveFixture.newZip()
     .binary("META-INF/APPLICATION.MF",
        OBRResolverTest.class.getClassLoader().getResourceAsStream("obr/APPLICATION.MF"))
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.