Examples of UnicodeReader


Examples of org.yaml.snakeyaml.reader.UnicodeReader

        assertTrue(file.isFile());
        return file;
    }

    protected List<Event> canonicalParse(InputStream input2) throws IOException {
        StreamReader reader = new StreamReader(new UnicodeReader(input2));
        StringBuilder buffer = new StringBuilder();
        while (reader.peek() != '\0') {
            buffer.append(reader.peek());
            reader.forward();
        }
View Full Code Here

Examples of org.yaml.snakeyaml.reader.UnicodeReader

        input2.close();
        return result;
    }

    protected List<Event> parse(InputStream input) throws IOException {
        StreamReader reader = new StreamReader(new UnicodeReader(input));
        Parser parser = new ParserImpl(reader);
        List<Event> result = new ArrayList<Event>();
        while (parser.peekEvent() != null) {
            result.add(parser.getEvent());
        }
View Full Code Here

Examples of org.yaml.snakeyaml.reader.UnicodeReader

    public void load() {
        FileInputStream stream = null;

        try {
            stream = new FileInputStream(file);
            read(yaml.load(new UnicodeReader(stream)));
        } catch (IOException e) {
            root = new HashMap<String, Object>();
        } catch (ConfigurationException e) {
            root = new HashMap<String, Object>();
        } finally {
View Full Code Here

Examples of org.yaml.snakeyaml.reader.UnicodeReader

    JavaBeanLoader<XmlSuite> loader = new JavaBeanLoader<XmlSuite>(XmlSuite.class);
    if (is == null)
    {
      is = new FileInputStream(new File(filePath));
    }
    XmlSuite result = loader.load(new UnicodeReader(is))// UnicodeReader
                                // used to
                                // respect BOM
    result.setFileName(filePath);
    // DEBUG
    // System.out.println("[Yaml] " + result.toXml());
View Full Code Here

Examples of org.zkoss.maven.yuicompressor.util.UnicodeReader

    OutputStreamWriter out = null;
    File outFileTmp = new File(outFile.getAbsolutePath() + ".tmp");
    FileUtils.forceDelete(outFileTmp);
    try {
      //bug fix for UTF8 BOM issue by TonyQ
      in = new UnicodeReader(new FileInputStream(inFile), encoding);
      if (!outFile.getParentFile().exists() && !outFile.getParentFile().mkdirs()) {
        throw new MojoExecutionException("Cannot create resource output directory: " + outFile.getParentFile());
      }
      getLog().debug("use a temporary outputfile (in case in == out)");
View Full Code Here

Examples of simpleserver.util.UnicodeReader

  public void load() {
    boolean success = false;

    File inFile = getFile();
    try {
      BufferedReader reader = new BufferedReader(new UnicodeReader(new FileInputStream(inFile), "UTF-8"));
      try {
        String line;
        while ((line = reader.readLine()) != null) {
          if (!line.startsWith("#")) {
            loadLine(line);
View Full Code Here

Examples of uk.ac.bbsrc.tgac.miso.core.util.UnicodeReader

    try {
      if (statusXml != null && !"".equals(statusXml)) {
        String runDirRegex = "([A-z0-9\\-]+)_([0-9]{8})_(.*)";
        Pattern runRegex = Pattern.compile(runDirRegex);
        Document statusDoc = SubmissionUtils.emptyDocument();
        SubmissionUtils.transform(new UnicodeReader(statusXml), statusDoc);

        String runName;
        if (statusDoc.getDocumentElement().getTagName().equals("error")) {
          runName = (statusDoc.getElementsByTagName("RunName").item(0).getTextContent());
        }
View Full Code Here

Examples of uk.ac.bbsrc.tgac.miso.core.util.UnicodeReader

  }

  public void parseStatusXml(String statusXml) {
    try {
      Document statusDoc = SubmissionUtils.emptyDocument();
      SubmissionUtils.transform(new UnicodeReader(statusXml), statusDoc);
      String runDirRegex = "([A-Za-z0-9]+)_([0-9]{8})_(.*)";
      Pattern runRegex = Pattern.compile(runDirRegex);

      if (statusDoc.getDocumentElement().getTagName().equals("error")) {
        String runName = statusDoc.getElementsByTagName("RunName").item(0).getTextContent();
View Full Code Here

Examples of uk.ac.bbsrc.tgac.miso.core.util.UnicodeReader

  public IlluminaRun(String statusXml, User user) {
    try {
      Document statusDoc = SubmissionUtils.emptyDocument();
      if (statusXml != null && !"".equals(statusXml)) {
        SubmissionUtils.transform(new UnicodeReader(statusXml), statusDoc);

        String runName = (statusDoc.getElementsByTagName("RunName").item(0).getTextContent());
        setPairedEnd(false);

        if (!statusDoc.getDocumentElement().getTagName().equals("error")) {
View Full Code Here

Examples of uk.ac.bbsrc.tgac.miso.core.util.UnicodeReader

  }

  public void parseStatusXml(String statusXml) {
    try {
      Document statusDoc = SubmissionUtils.emptyDocument();
      SubmissionUtils.transform(new UnicodeReader(statusXml), statusDoc);

      if (statusDoc.getDocumentElement().getTagName().equals("error")) {
        String runName = statusDoc.getElementsByTagName("RunName").item(0).getTextContent();
        String runDirRegex = "(\\d{6})_([A-z0-9]+)_(\\d+)_[A-z0-9_]*";
        Matcher m = Pattern.compile(runDirRegex).matcher(runName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.