code: static HeaderEntry parse(final String elementLine) throws IOException {
          if (!elementLine.startsWith("element ")) {
              throw new IOException("not an element: '"
                      + elementLine + "'");
          }
          String definition = elementLine.substring("element ".length());
  
          String[] parts = definition.split(" +", 2);
          if (parts.length != 2) {
              throw new IOException("Expected two parts in element definition: '"
                      + elementLine + "'");
          }
          String name = parts[0];
          String countStr = parts[1];
          int count;
          try {
              count = Integer.parseInt(countStr);
          }
          catch (NumberFormatException e) {
              throw new IOException("Invalid element entry. Not an integer: '"
                      + countStr + "'.");
          }
          return new HeaderEntry(name, count);
      }
docs: Parses a header line starting an element description.
  @param elementLine Header line.
  @return ElementType without properties.
  @throws IOException if the header line has an invalid format.