code: public Map<X500Principal, SigningPolicy> parse(Reader reader)
              throws SigningPolicyException {
  
          Map<X500Principal, SigningPolicy> policies = new HashMap<X500Principal, SigningPolicy>();
  
          BufferedReader bufferedReader = new BufferedReader(reader);
          try {
              String line;
  
              while ((line = bufferedReader.readLine()) != null) {
  
                  line = line.trim();
  
                  // read line until some line that needs to be parsed.
                  if (!isValidLine(line)) {
                      continue;
                  }
  
                  logger.debug("Line to parse: " + line);
  
                  String caDN = null;
                  if (line.startsWith(ACCESS_ID_PREFIX)) {
  
                      logger.debug("Check if it is CA and get the DN " + line);
                      caDN = getCaDN(line, caDN);
                      boolean usefulEntry = true;
                      Boolean posNegRights = null;
                      // check for neg or pos rights with restrictions
                      checkRights(policies, bufferedReader, caDN, usefulEntry, posNegRights);
                  }
                  // JGLOBUS-94
              }
          } catch (IOException exp) {
              throw new SigningPolicyException("", exp);
          } finally {
              cleanupReaders(reader, bufferedReader);
          }
          return policies;
      }
docs: Parses input stream to extract signing policy defined for CA with the
  specified DN.
  
  @param reader Reader to any input stream to get the signing policy
  information.
  @return signing policy map defined by the signing policy file
  @throws org.globus.gsi.SigningPolicyException
  Any errors with parsing the signing policy.