code: public String nextVASPTokenFollowing(String string) throws IOException {
          int index;
          String line;
          while (inputBuffer.ready()) {
              line = inputBuffer.readLine();
              index = line.indexOf(string);
              if (index > 0) {
                  index = index + string.length();
                  line = line.substring(index);
                  st = new StringTokenizer(line, " =\t");
                  while (!st.hasMoreTokens() && inputBuffer.ready()) {
                      line = inputBuffer.readLine();
                      st = new StringTokenizer(line, " =\t");
                  }
                  if (st.hasMoreTokens()) {
                      fieldVal = st.nextToken();
                  } else {
                      fieldVal = null;
                  }
                  break;
              }
          }
          return fieldVal;
      }
docs: Find the next token of a VASP file beginning
  with the *next* line.