/** * Reads PIN information from file and adds a new object into vector. * * @param r reader for permissions file. * @param dest destination vector. * @throws IOException if I/O error occurs. */ private static void readAPDUPIN(ACLFileReader r, Vector dest) throws IOException { r.checkWord("{"); r.checkWord("id"); int id = r.readByte(); Integer[] commands = new Integer[ACLPermissions.CMD_COUNT]; while (true) { String s = r.readWord(); if (s.equals("}")) { break; } int index = getPINCommandIndex(s); int command = 0; for (int i = 0; i < 4; i++) { command = (command << 8) | r.readByte(); } commands[index] = new Integer(command); } dest.addElement(new PINData(id, commands)); }
/** * Reads PIN information from file and adds a new object into vector. * * @param r reader for permissions file. * @param dest destination vector. * @throws IOException if I/O error occurs. */ private static void readJCRMIPIN(ACLFileReader r, Vector dest) throws IOException { r.checkWord("{"); r.checkWord("id"); int id = r.readByte(); String[] commands = new String[ACLPermissions.CMD_COUNT]; while (true) { String s = r.readWord(); if (s.equals("}")) { break; } commands[getPINCommandIndex(s)] = r.readWord(); } dest.addElement(new PINData(id, commands)); }