code: public String getHeaderField(int n) {
          try {
              getInputStream();
          } catch (Exception e) {
              return null;
          }
          MessageHeader props = properties;
          return props == null ? null : props.getValue(n);
      }
docs: Return the value for the nth header field. Returns null if
  there are fewer than n fields.  This can be used in conjunction
  with getHeaderFieldKey to iterate through all the headers in the message.