void parseMacKeyHeaderLine(String line, KatResult kr) { Scanner ls = new Scanner(line); ls.findInLine(".*=\\s*(\\d+) .*"); MatchResult result = null; try { result = ls.match(); } catch (Exception e) { System.out.println("Mac header: " + line); e.printStackTrace(); System.exit(1); } kr.macKeyLen = Integer.parseInt(result.group(1)); kr.macKey = new byte[kr.macKeyLen]; state = MacKey; }