public HeadRuleMap(InputStream in){
  BufferedReader reader=IOUtils.createBufferedReader(in);
  String line, pTag, dir, rule;
  String[] tmp;
  try {
    while ((line=reader.readLine()) != null) {
      tmp=P_COLUMN.split(line);
      pTag=tmp[0];
      dir=tmp[1];
      rule=tmp[2];
      put(pTag,new HeadRule(dir,rule));
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

public HeadRuleMap ( InputStream in ) { BufferedReader reader = IOUtils . createBufferedReader ( in ) ; String line , pTag , dir , rule ; String [ ] tmp ; try { while ( ( line = reader . readLine ( ) ) != null ) { tmp = P_COLUMN . split ( line ) ; pTag = tmp [ 0 ] ; dir = tmp [ 1 ] ; rule = tmp [ 2 ] ; put ( pTag , new HeadRule ( dir , rule ) ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } }
constructs a headrule map from the specific reader . each line indicates the headrule for a specific phrase .
