package rdc;

public class Header implements Constants {
  String name;
  int flags;
  int version;
  int create_time;
  int mod_time;
  int backup_time;
  int mod_num;
  int app_info;
  int sort_info;
  int type;
  int id;
  int unique_id_seed;
  int next_record_list;
  int num_records;
  Header(Buffer b) {
    //    byte[] tmpName = b.GetBytes(32);
    //    for (int i = 0; i < 32; i++ ) {
    //      if ( tmpName[i] == 0 ) {
    //	name = new String(tmpName, 0, i);
    //      }
    //    }
    name = b.GetString(32);
    flags = b.GetShort();
    version = b.GetShort();
    create_time = b.GetInt();
    mod_time = b.GetInt();
    backup_time = b.GetInt();
    mod_num = b.GetInt();
    app_info = b.GetInt();
    sort_info = b.GetInt();
    type = b.GetInt();
    id = b.GetInt();
    unique_id_seed = b.GetInt();
    next_record_list = b.GetInt();
    num_records = b.GetShort();
  }
  int NumResources() {
    return num_records;
  }
  String Name() {
    return name;
  }
}

