Package org.springframework.core.io

Examples of org.springframework.core.io.InputStreamResource


     * @param is XML InputStream to load bean definitions from
     * @throws BeansException in case of loading or parsing errors
     * @see #ActiveMQBeanFactory(String, Resource)
     */
    public ActiveMQBeanFactory(String brokerName, InputStream is) throws BeansException {
        this(brokerName, new InputStreamResource(is, "(no description)"), null);
    }
View Full Code Here


     * @throws org.springframework.beans.BeansException
     *          in case of loading or parsing errors
     * @see #JCABeanFactory(org.springframework.core.io.Resource)
     */
    public JCABeanFactory(InputStream is) throws BeansException {
        this(new InputStreamResource(is, "(no description)"), null);
    }
View Full Code Here

    processEngineConfiguration.setBeans(new SpringBeanFactoryProxyMap(beanFactory));
    return processEngineConfiguration;
  }

  public static ProcessEngineConfiguration parseProcessEngineConfigurationFromInputStream(InputStream inputStream, String beanName) {
    Resource springResource = new InputStreamResource(inputStream);
    return parseProcessEngineConfiguration(springResource, beanName);
  }
View Full Code Here

          log.error(errorMessage);
          throw new SynapseException(errorMessage);
        }

        xbdr.loadBeanDefinitions(
            new InputStreamResource(
                SynapseConfigUtils.getStreamSource(springConfig).getInputStream()));
        appContext.refresh();
        if (traceOrDebugOn) {
            traceOrDebug(traceOn, "Spring ApplicationContext from key : " + configKey + " created");
        }
View Full Code Here

   * Returns the location of the test framework bundles configuration.
   *
   * @return the location of the test framework bundles configuration
   */
  protected Resource getTestingFrameworkBundlesConfiguration() {
    return new InputStreamResource(
      AbstractDependencyManagerTests.class.getResourceAsStream(TEST_FRRAMEWORK_BUNDLES_CONF_FILE));
  }
View Full Code Here

          Package pkg = classToInspect.getPackage();
          if (pkg != null) {
            clazzPackage = pkg.getName();
            String classFile = ClassUtils.getClassFileName(classToInspect);
            entries.put(classToInspect.getName().replace('.', '/').concat(ClassUtils.CLASS_FILE_SUFFIX),
              new InputStreamResource(classToInspect.getResourceAsStream(classFile)));
          }
          // handle default package
          else {
            logger.warn("Could not find package for class " + classToInspect + "; ignoring...");
          }
View Full Code Here

     * @param is XML InputStream to load bean definitions from
     * @throws BeansException in case of loading or parsing errors
     * @see #ActiveMQBeanFactory(String, Resource)
     */
    public ActiveMQBeanFactory(String brokerName, InputStream is) throws BeansException {
        this(brokerName, new InputStreamResource(is, "(no description)"), null);
    }
View Full Code Here

     * @throws org.springframework.beans.BeansException
     *          in case of loading or parsing errors
     * @see #JCABeanFactory(org.springframework.core.io.Resource)
     */
    public JCABeanFactory(InputStream is) throws BeansException {
        this(new InputStreamResource(is, "(no description)"), null);
    }
View Full Code Here

/**
*/
public class ResourceFieldSetReaderTests extends TestCase {

  public void testRead() throws Exception {
    Resource resource = new InputStreamResource(
        new ByteArrayInputStream("foo,bar,spam\nbucket,crap,man".getBytes()));
    ResourceFieldSetReader reader = new ResourceFieldSetReader(resource);
    int count = 0;
    FieldSet fieldSet;
    while ((fieldSet = reader.read()) != null) {
View Full Code Here

    }
    assertEquals(2, count);
  }

  public void testDelimiter() throws Exception {
    Resource resource = new InputStreamResource(new ByteArrayInputStream("foo.bar.spam".getBytes()));
    ResourceFieldSetReader reader = new ResourceFieldSetReader(resource, '.');
    int count = 0;
    FieldSet fieldSet;
    while ((fieldSet = reader.read()) != null) {
      count++;
View Full Code Here

TOP

Related Classes of org.springframework.core.io.InputStreamResource

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.