code: public int getIntHeader(String name)
      {
          HeaderField f = getHeaderField(name);
          if (f != null)
          {
              return f.getIntValue();
          }
          else
          {
              return -1;
          }
      }
docs: Retrieve a response header as an int.