Package org.apache.aries.web.converter.WarToWabConverter

Examples of org.apache.aries.web.converter.WarToWabConverter.InputStreamProvider


    }

    public InputStream convert(IDirectory parentEba, final IFile toBeConverted) {
        if (toBeConverted.getName().endsWith(WAR_FILE_EXTENSION)) {
            try {
                return wabConverter.convert(new InputStreamProvider() {
                    public InputStream getInputStream() throws IOException {
                        return toBeConverted.open();
                    }
                }, toBeConverted.getName(), new Properties());
            } catch (IOException e) {
View Full Code Here


    JarOutputStream out = new JarOutputStream(bout);
    out.putNextEntry(new ZipEntry("random.html"));
    out.write("hello world".getBytes());
    out.close();
   
    InputStreamProvider input = makeTestFile(bout.toByteArray());
   
    Properties props = new Properties();
    props.put(WarToWabConverter.WEB_CONTEXT_PATH, "/test");
    props.put(Constants.BUNDLE_SYMBOLICNAME, "test.bundle");
    WarToWabConverterImpl sut = new WarToWabConverterImpl(input, WAR_FILE_NAME, props);
View Full Code Here

    return convertWithProperties(null, props);
  }
 
 
  private InputStreamProvider makeTestFile(final byte[] content) {
    return new InputStreamProvider() {     
      public InputStream getInputStream() throws IOException {
        return new ByteArrayInputStream(content);
      }
    };
 
View Full Code Here

    }

    public BundleConversion convert(IDirectory parentEba, final IFile toBeConverted) {
        if (toBeConverted.getName().endsWith(WAR_FILE_EXTENSION)) {
            try {
              final WabConversion conversion = wabConverter.convert(new InputStreamProvider() {
                    public InputStream getInputStream() throws IOException {
                        return toBeConverted.open();
                    }
                }, toBeConverted.getName(), new Properties());
                           
View Full Code Here

    }

    public BundleConversion convert(IDirectory parentEba, final IFile toBeConverted) {
        if (toBeConverted.getName().endsWith(WAR_FILE_EXTENSION)) {
            try {
              final WabConversion conversion = wabConverter.convert(new InputStreamProvider() {
                    public InputStream getInputStream() throws IOException {
                        return toBeConverted.open();
                    }
                }, toBeConverted.getName(), new Properties());
                           
View Full Code Here

    }

    public BundleConversion convert(IDirectory parentEba, final IFile toBeConverted) {
        if (toBeConverted.getName().endsWith(WAR_FILE_EXTENSION)) {
            try {
              final WabConversion conversion = wabConverter.convert(new InputStreamProvider() {
                    public InputStream getInputStream() throws IOException {
                        return toBeConverted.open();
                    }
                }, toBeConverted.getName(), new Properties());
                           
View Full Code Here

    if (fileNameIndex != 0)
      warName = url.getFile().substring(fileNameIndex);
    else
      warName = url.getFile();

    converter = new WarToWabConverterImpl(new InputStreamProvider() {
      public InputStream getInputStream() throws IOException {
        return url.openStream();
      }
    }, warName, properties);
  }
View Full Code Here

TOP

Related Classes of org.apache.aries.web.converter.WarToWabConverter.InputStreamProvider

Copyright © 2018 www.massapicom. 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.