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 {