public static SpecialCaseMap[] readSpecFile(File file,int plane) throws FileNotFoundException {
  ArrayList<SpecialCaseMap> caseMaps=new ArrayList<>(150);
  int count=0;
  BufferedReader f=new BufferedReader(new FileReader(file));
  String line=null;
  loop:   while (true) {
    try {
      line=f.readLine();
    }
 catch (    IOException e) {
      break loop;
    }
    if (line == null)     break loop;
    SpecialCaseMap item=parse(line.trim());
    if (item != null) {
      if (item.getCharSource() >> 16 < plane)       continue;
      if (item.getCharSource() >> 16 > plane)       break;
      caseMaps.add(item);
      ++count;
    }
  }
  caseMaps.trimToSize();
  SpecialCaseMap[] result=new SpecialCaseMap[caseMaps.size()];
  caseMaps.toArray(result);
  Arrays.sort(result);
  return result;
}

public static SpecialCaseMap [ ] readSpecFile ( File file , int plane ) throws FileNotFoundException { ArrayList < SpecialCaseMap > caseMaps = new ArrayList < > ( 150 ) ; int count = 0 ; BufferedReader f = new BufferedReader ( new FileReader ( file ) ) ; String line = null ; loop : while ( true ) { try { line = f . readLine ( ) ; } catch ( IOException e ) { break loop ; } if ( line == null ) break loop ; SpecialCaseMap item = parse ( line . trim ( ) ) ; if ( item != null ) { if ( item . getCharSource ( ) > > 16 < plane ) continue ; if ( item . getCharSource ( ) > > 16 > plane ) break ; caseMaps . add ( item ) ; ++ count ; } } caseMaps . trimToSize ( ) ; SpecialCaseMap [ ] result = new SpecialCaseMap [ caseMaps . size ( ) ] ; caseMaps . toArray ( result ) ; Arrays . sort ( result ) ; return result ; }
read and parse a unicode special case map file .
