Last updated September 29, 2009 20:53, by gorbeia
Feedicon  

AEB 43 for Java Wiki

Documentation

Documentation for AEB 43 format

Getting Aeb43forJava

requirements

  • Java 1.5 or superior
  • ant

download

TODO

build

Just run ant inside the downloaded folder.

Reading an AEB43 file

        // A file may have more than one account
        List<Account> accounts = new ArrayList<Account>();

        // Just a reader, use the one that fits your needs
        FileReader fr;
        try {
            fr = new FileReader("/path/to/file");
        } catch (FileNotFoundException ex) {
            System.err.println("File not found.");
            System.exit(1);
            return;
        }

        AccountReader accountReader = new AccountReader(fr);
        RecordReader recordReader;
        Account account;
        // Iterate for each account in the file
        while (accountReader.hasNext()) {
            account = new Account();

            recordReader = accountReader.next();
            account.setAccountData(recordReader.getAccountData());

            // Iterate for each record in the file
            while (recordReader.hasNext()) {
                account.appendRecord(recordReader.next());
            }
            accounts.add(account);
        }


Even simpler

        // A file may have more than one account
        List<Account> accounts = new ArrayList<Account>();

        // Just a reader, use the one that fits your needs
        FileReader fr;
        try {
            fr = new FileReader("/path/to/file");
        } catch (FileNotFoundException ex) {
            System.err.println("File not found.");
            System.exit(1);
            return;
        }

        // Really simple
        SimpleAccountReader reader = new SimpleAccountReader(fr);
        while (reader.hasNext()) {
            accounts.add(reader.next());
        }

  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close