private void init(String domain, String charsetname){

    _charset = Charset.forName(charsetname);

    _fsa = new FSA(domain + ".fsa",charsetname);

    if(!_fsa.isOk()){
      return;
    }

    FileInputStream file;
    try {
      file = new FileInputStream(domain + ".dat");
    }
    catch (FileNotFoundException e) {
      System.out.print("ConceptNet data file " + domain + ".dat" + " not found.\n");
      return;
    }

    try {
      _header = file.getChannel().map(MapMode.READ_ONLY,0,256);
      _header.order(ByteOrder.LITTLE_ENDIAN);
      if(h_magic()!=238579428){
        System.out.print("ConceptNet bad magic " + h_magic() +"\n");
        return;
      }
      _index    = file.getChannel().map(MapMode.READ_ONLY,
                                        256,
                                        8*4*h_index_size());
      _index.order(ByteOrder.LITTLE_ENDIAN);
      _info     = file.getChannel().map(MapMode.READ_ONLY,
                                        256+8*4*h_index_size(),
                                        4*h_info_size());
      _info.order(ByteOrder.LITTLE_ENDIAN);
      _catindex = file.getChannel().map(MapMode.READ_ONLY,
                                        256+8*4*h_index_size()+4*h_info_size(),
                                        4*h_catindex_size());
      _catindex.order(ByteOrder.LITTLE_ENDIAN);
      _strings  = file.getChannel().map(MapMode.READ_ONLY,
                                        256+8*4*h_index_size()+4*h_info_size()+4*h_catindex_size(),
                                        h_strings_size());
      _strings.order(ByteOrder.LITTLE_ENDIAN);
      _ok=true;
    }
    catch (IOException e) {
      System.out.print("ConceptNet IO exception.\n");
      return;
    }
  }
Class for accessing the concept network automata.

@author  <a href="mailto:boros@yahoo-inc.com">Peter Boros</a>
fsa/src/main/java/com/yahoo/fsa/conceptnet/ConceptNet.java