String parent = System.getProperty("user.home") + "/Downloads";
String fileName = arg.replace(".txt", ".ofx");
File output = new File(parent, fileName);
FileOutputStream fos = new FileOutputStream(output);
OFXV1Writer writer = new OFXV1Writer(fos);
writer.setWriteAttributesOnNewLine(true);
AggregateMarshaller marshaller = new AggregateMarshaller();
marshaller.setConversion(new MyFinanceStringConversion());
marshaller.marshal(envelope, writer);
writer.flush();
writer.close();
}
}
}
System.out.println("TOTAL FATURAS EM RS " + formatter.format(total));
}