Package org.iupac.goldbook.goldify.processors

Examples of org.iupac.goldbook.goldify.processors.DocumentProcessor


    while((charsRead = inp.read(charBuffer)) > 0) {
      sb.append(charBuffer,0,charsRead);
    }
    String[] parts = filename.split("\\.");
      String ext = parts[parts.length-1].toLowerCase();
    DocumentProcessor dp = documentProcessorManager.getProcessorForType(ext);
    // where to put the output
    OutputStream output;
      if (outputFilename != null)
        output = new BufferedOutputStream(new FileOutputStream(outputFilename));
      else
        output = System.out;
    // write it there
      output.write(dp.process(sb.toString()).getBytes(charset));
    // close if file
      if (outputFilename != null)
        output.close();
  }
View Full Code Here


    out.write(String.format("%c %d\n", firstChar, message.length).getBytes(charset));
       out.write(message);
  }
 
  private String process (String format, String input) throws GoldifyException {
    DocumentProcessor dp = dpm.getProcessorForType(format);
    return dp.process(input);
  }
View Full Code Here

TOP

Related Classes of org.iupac.goldbook.goldify.processors.DocumentProcessor

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.