Package com.Ostermiller.util

Examples of com.Ostermiller.util.ConcatReader


  public CharResponseContent(BRJS brjs, String content) {
    this(brjs, new StringReader(content));
  }
 
  public CharResponseContent(BRJS brjs, Reader... readers) {
    this(brjs, new ConcatReader(readers));
  }
View Full Code Here


    {
      logger.error(Messages.ERROR_WHILE_BUNDLING_MSG, errorStream.toString());
      readers.add( new StringReader(String.format(Messages.ERROR_WHILE_BUNDLING_MSG, errorStream.toString())) );
    }
   
    return new ConcatReader( readers.toArray(new Reader[0]) );
  }
View Full Code Here

    for (InputSource inputSource : inputSources) {
      readers.add( inputSource.getContentPluginReader() );
      readers.add( new StringReader("\n\n") );
    }
   
    return new ConcatReader( readers.toArray(new Reader[0]) );
  }
View Full Code Here

  }
 
  @Override
  public Reader getUnalteredContentReader() throws IOException {
    if (patch.patchAvailable()){
      return new ConcatReader( new Reader[] { linkedFileAsset.getReader(), patch.getReader() });
    } else {
      return linkedFileAsset.getReader();
    }
  }
View Full Code Here

        new StringReader( "\n" ),
        new StringReader( "module.exports = " + getPrimaryRequirePath().replaceAll("/", ".") + ";" ),
        new StringReader( requireAllInvocation ),
        new StringReader(CommonJsSourceModule.COMMONJS_DEFINE_BLOCK_FOOTER),
      };
      return new ConcatReader( readers );
    }
    catch (ModelOperationException e) {
      throw new IOException("Unable to create the SourceModule reader", e);
    }
  }
View Full Code Here

    {
      throw new RuntimeException(e);
    }
   
   
    return new ConcatReader(fileReaders.toArray(new Reader[]{}));
  }
View Full Code Here

    try
    {
      String defaultFileCharacterEncoding = assetLocation.root().bladerunnerConf().getDefaultFileCharacterEncoding();
      Reader assetReader = new UnicodeReader(assetFile, defaultFileCharacterEncoding);
      if (patch.patchAvailable()){
        return new ConcatReader( new Reader[] { assetReader, patch.getReader() });
      } else {
        return assetReader;
      }
    }
    catch (ConfigException ex)
View Full Code Here

    }
  }
 
  @Override
  public Reader getReader() throws IOException {
    return new ConcatReader(new Reader[] {
      new StringReader( String.format(COMMONJS_DEFINE_BLOCK_HEADER, getPrimaryRequirePath()) ),
      getUnalteredContentReader(),
      new StringReader( COMMONJS_DEFINE_BLOCK_FOOTER )
    });
  }
View Full Code Here

  private Reader getPackageStructureReader(Map<String, Map<String, ?>> packageStructure)
  {
    if (packageStructure.size() > 0)
    {
      Gson gson = new GsonBuilder().create();
      return new ConcatReader(new Reader[]{
        new StringReader("// package definition block\n")
        new StringReader("mergePackageBlock(window, ")
        new StringReader(gson.toJson(packageStructure)),
        new StringReader(");\n"
      });
View Full Code Here

TOP

Related Classes of com.Ostermiller.util.ConcatReader

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.