Package org.apache.commons.io.input

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


    @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


  /**
   * {@inheritDoc}
   */
  public void process(final Resource resource, final Reader reader,
    final Writer writer) throws IOException {
      final InputStream is = new ProxyInputStream(new ReaderInputStream(reader, getEncoding())) {};
      final OutputStream os = new ProxyOutputStream(new WriterOutputStream(writer, getEncoding()));
    try {
      new JSMin(is, os).jsmin();
      is.close();
      os.close();
View Full Code Here

  }
 
  private String jsmin(final String inputScript)
      throws Exception {
    final StringReader reader = new StringReader(inputScript);
    final InputStream is = new ReaderInputStream(reader, "UTF-8");
    final StringWriter writer = new StringWriter();
    final OutputStream os = new WriterOutputStream(writer, "UTF-8");
    new JSMin(is, os).jsmin();
    return writer.toString();
  }
View Full Code Here

      // /////////////////
      // InputStream ->Reader
      InputStreamReader reader = new InputStreamReader(in, Charsets.UTF_8);
      // Reader->InputStream
      ReaderInputStream in3 = new ReaderInputStream(reader, Charsets.UTF_8);

      // OutputStream ->Writer
      OutputStreamWriter writer = new OutputStreamWriter(System.out, Charsets.UTF_8);
      // Writer->OutputStream
      WriterOutputStream out2 = new WriterOutputStream(writer, Charsets.UTF_8);
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

    @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 void execute(DbStep step)
    {
        LOG.info("[SQL STEP]:" + step.getName() + " (" + step.getVersion() + ")");

        sql(new ReaderInputStream(step.getStepReader())).interceptWith(new VelocityInterceptor(variables)).on(dataSource).run();
    }
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

                        {
                            boolean isPropertyFile = AssemblyFileUtils.isPropertyFile( plexusIoResource.getName() );
                            Reader filtered =
                                createReaderFilter( source, configSource.getEscapeString(), configSource.getDelimiters(),
                                                    configSource, isPropertyFile );
                            final ReaderInputStream readerInputStream = encoding != null
                                ? new ReaderInputStream( filtered, encoding )
                                : new ReaderInputStream( filtered );

                            LineEndings lineEnding = LineEndingsUtils.getLineEnding( lineEndingHint );
                            if ( !LineEndings.keep.equals( lineEnding ) )
                            {
                                return LineEndingsUtils.lineEndingConverter( readerInputStream, lineEnding );
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.