private void parseBulkFile(File testdatafile, CardScheme scheme) {

        if (!testdatafile.canRead() || !testdatafile.isFile())
            fail("can't read testdatafile.");

        BufferedReader in = null;
        try {
            in = new BufferedReader(new FileReader(testdatafile));
            String row = null;
            while ((row = in.readLine()) != null) {
                String[] segs = row.split(Pattern.quote(","));
                String twoData = segs[segs.length - 1].trim();

                if (!MsgUtils.isHex(twoData)) {
                    logger.warn("WARNING : " + twoData
                            + "is not a hexString");
                    continue;
                }
                logger.debug(twoData);
                parseRow(twoData, scheme);

            }
        } catch (IOException e) {
            e.printStackTrace();
            fail("can't opem testdatafile.");
        } finally {
            if (in != null)
                try {
                    in.close();
                } catch (IOException e) {
                    fail("can't close testdatafile.");
                }
        }
    }