Package org.apache.commons.io.input

Examples of org.apache.commons.io.input.ReaderInputStream


    /**
     * Creates loader for script reader.
     */
    public static SqlScriptLoader loadScriptFromReader(Reader reader)
    {
        return loadScriptFromStream(new ReaderInputStream(reader));
    }
View Full Code Here


    @Override
    public InputStream getResourceAsStream(TemplateProcessingParameters theTemplateProcessingParameters, String theName) {
      String template = myNameToNarrativeTemplate.get(theName);
      if (template == null) {
        ourLog.info("No narative template for resource profile: {}", theName);
        return new ReaderInputStream(new StringReader(""));
      }
      return new ReaderInputStream(new StringReader(template));
    }
View Full Code Here

    @Override
    public InputStream getResourceAsStream(TemplateProcessingParameters theTemplateProcessingParameters, String theName) {
      String template = myNameToTitleTemplate.get(theName);
      if (template == null) {
        ourLog.info("No narative template for resource profile: {}", theName);
        return new ReaderInputStream(new StringReader(""));
      }
      return new ReaderInputStream(new StringReader(template));
    }
View Full Code Here

    }

    AtmosphereRequest request = resource.getRequest();
    List<AtmosphereRequest> list = new ArrayList<AtmosphereRequest>();
    list.add(constructRequest(resource, request.getPathInfo(), request.getRequestURI(), methodType, contentType,
        destroyable).inputStream(new ReaderInputStream(r)).build());

    return list;
  }
View Full Code Here

    }

    @Test
    public final void givenUsingGuava_whenConvertingStringToInputStream_thenCorrect() throws IOException {
        final String initialString = "text";
        final InputStream targetStream = new ReaderInputStream(CharSource.wrap(initialString).openStream());

        IOUtils.closeQuietly(targetStream);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.io.input.ReaderInputStream

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.