Package de.ddb.conversion

Examples of de.ddb.conversion.BinaryConverter


                  }
              }
            }
            try
            {
              BinaryConverter binaryConverter = new BinaryConverter(command,
                                                                    envProperties, bc.getProcessInEncoding(),
                                                                    bc.getProcessOutEncoding(),
                                                                    numberOfProcesses);
              for (String sourceFormat : bc.getSourceFormatList())
              {
View Full Code Here


            logger.debug("main(String[]) - start");
        }
        parseArgs(args);
        try {
          ConversionContext ctx = ConversionContextFactory.newDefaultEnvironment();
          Converter c = new BinaryConverter(fcvprogrampath + " "
                                            + fcvtablepath + " mab", new ArrayList<String>(0), "x-PICA", "x-PICA", 0);
          c.getConverterContext().setSourceEncoding("x-PICA");
          c.getConverterContext().setTargetEncoding("x-PICA");
          c.getConverterContext().setSourceFormat(ctx.getFormat(ConversionContextFactory.DOCFORMATNAME_PICAPLUS));
          c.getConverterContext().setTargetFormat(ctx.getFormat(ConversionContextFactory.DOCFORMATNAME_MABXML1));
          ctx.addConverter(c);
           
            if (logger.isDebugEnabled()) {
                logger.debug("main() - starting conversion");
            }
            // StringBuffer input = new StringBuffer();
            // int i;
            // while ((i = in.read()) != -1) {
            // input.append((char) i);
            // }
            // String output = new MabToMabxmlConverter().convert(picaToMab
            // .convert(input.substring(0), report), report);
            // out.write(output);
            // if (logger.isDebugEnabled()) {
            // logger.debug("main() - finished conversion. output = " + output);
            // }
            Converter mab2Mabxml = ctx.addConverter(new MabToMabxmlConverter());
            ConversionParameters params = new ConversionParameters();
            mab2Mabxml.convert(c.convert(in, params),
                    out);
            if (logger.isDebugEnabled()) {
                logger.debug("main() - finished conversion.");
            }
        } finally {
View Full Code Here

TOP

Related Classes of de.ddb.conversion.BinaryConverter

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.