Skip to content

HowTo's

Andrii Frunt edited this page May 1, 2017 · 2 revisions

How to read the ACH document?

To read the document from input stream you simply need to:

ACH ach = new ACH();
InputStream is = ...;
ACHDocument document = ach.read(is);

Same method is overloaded for string parameter, so you can read your document from string as well:

ACH ach = new ACH();
String documentString = ...;
ACHDocument document = ach.read(documentString);

How to write the ACH document back to text representation?

To write the document to string

ACH ach = new ACH();
ACHDocument document = ...;
String documentString = ach.write(document);

To write the document to output stream:

ACH ach = new ACH();
ACHDocument document = ...;
OutputStream os = ...;
ach.write(document, os);

Clone this wiki locally