code: public long getLongHeader(String name, long defaultValue) {
          String firstHeader = getHeader(name);
          if (firstHeader == null) {
              return defaultValue;
          }
          try {
              return Long.parseLong(firstHeader.trim());
          } catch (NumberFormatException e) {
              return defaultValue;
          }
      }
docs: Get header value as long. If not exists, return defaultValue