visad/src/main/java/ucar/nc2/iosp/gempak/GempakFileReader.java
protected void readFileHeaderInfo() throws IOException {
    if (dmLabel == null) {
      return;
    }
    int iread = dmLabel.kpfile;
    int numheaders = dmLabel.kfhdrs;
    String[] names = new String[numheaders];
    int[] lens = new int[numheaders];
    int[] types = new int[numheaders];
    for (int i = 0; i < numheaders; i++) {
      names[i] = DM_RSTR(iread++);
    }
    for (int i = 0; i < numheaders; i++) {
      lens[i] = DM_RINT(iread++);
    }
    for (int i = 0; i < numheaders; i++) {
      types[i] = DM_RINT(iread++);
    }
    fileHeaderInfo = new ArrayList<>();

    for (int i = 0; i < numheaders; i++) {
      DMFileHeaderInfo ghi = new DMFileHeaderInfo();
      ghi.kfhnam = names[i];
      ghi.kfhlen = lens[i];
      ghi.kfhtyp = types[i];
      fileHeaderInfo.add(ghi);
    }
  }
protected void readFileHeaderInfo() throws IOException {
    if (dmLabel == null) {
      return;
    }
    int iread = dmLabel.kpfile;
    int numheaders = dmLabel.kfhdrs;
    String[] names = new String[numheaders];
    int[] lens = new int[numheaders];
    int[] types = new int[numheaders];
    for (int i = 0; i < numheaders; i++) {
      names[i] = DM_RSTR(iread++);
    }
    for (int i = 0; i < numheaders; i++) {
      lens[i] = DM_RINT(iread++);
    }
    for (int i = 0; i < numheaders; i++) {
      types[i] = DM_RINT(iread++);
    }
    fileHeaderInfo = new ArrayList<>();

    for (int i = 0; i < numheaders; i++) {
      DMFileHeaderInfo ghi = new DMFileHeaderInfo();
      ghi.kfhnam = names[i];
      ghi.kfhlen = lens[i];
      ghi.kfhtyp = types[i];
      fileHeaderInfo.add(ghi);
    }
  }
Read the file header info (DM_RFIL)

@throws IOException problem reading file