Package org.bladerunnerjs.utility

Examples of org.bladerunnerjs.utility.UnicodeReader


  {
    File emptyFile = new File(resourceDir, "4byteFile.txt");
    int buffLength = 8192;
    char[] buff = new char[buffLength];
   
    UnicodeReader bundlerFileReader = new UnicodeReader(new FileInputStream(emptyFile));
    int bytesReadWithBundlerFileReader = bundlerFileReader.read(buff, 0, buffLength);
   
    InputStreamReader isr = new InputStreamReader(new FileInputStream(emptyFile));
    int bytesReadWithInputStreamReader = isr.read(buff, 0, buffLength);
   
    assertEquals(bytesReadWithInputStreamReader, bytesReadWithBundlerFileReader);
View Full Code Here


    CF conf;
   
    try {
      YamlReader reader = null;
     
      try(Reader fileReader = new UnicodeReader(confFile, defaultFileCharacterEncoding)) {
        if(!fileReader.ready()) {
          return newConf(node, confClass);
        }
       
        reader = new YamlReader(fileReader);
        conf = reader.read(confClass);
View Full Code Here

    AliasesData aliasesData = new AliasesData();
    aliasesData.aliasOverrides = new ArrayList<>();
    aliasesData.groupNames = new ArrayList<>();
   
    if(aliasesFile.exists()) {
      try(Reader fileReader = new UnicodeReader(aliasesFile, defaultFileCharacterEncoding)) {
        XMLStreamReader2 streamReader = XmlStreamReaderFactory.createReader(fileReader, aliasesSchema);
       
        while(streamReader.hasNext()) {
          if(streamReader.getEventType() == XMLStreamReader.START_ELEMENT) {
            switch(streamReader.getLocalName()) {
View Full Code Here

        if (patchFile.isFile())
        {
          brjs.logger(SourceModulePatch.class).debug(PATCH_APPLIED_MESSAGE, requirePath, RelativePathUtility.get(brjs.getFileInfoAccessor(), brjs.dir(), patchFile));
          try
          {
            reader = new BufferedReader(new UnicodeReader(patchFile, brjs.bladerunnerConf().getDefaultFileCharacterEncoding()));
          }
          catch (IOException | ConfigException e)
          {
            throw new RuntimeException(e);
          }     
View Full Code Here

    }
  }
 
  @Override
  public Reader getReader() throws IOException {
    return new UnicodeReader(file, defaultFileCharacterEncoding);
  }
View Full Code Here

    }
  }
 
  @Override
  public Reader getReader() throws IOException {
    return new UnicodeReader(assetFile, defaultFileCharacterEncoding);
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.utility.UnicodeReader

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.