HttpHeadersBase extends StringMultimap</* IN_NAME */ CharSequence, /* NAME */ AsciiString> implements HttpHeaderGetters { URI uri() { final String uri; final String path = path(); if (isAbsoluteUri(path)) { uri = path; } else { final String scheme = scheme(); checkState(scheme != null, ":scheme header does not exist."); final String authority = authority(); checkState(authority != null, ":authority header does not exist."); uri = scheme + ": } try { return new URI(uri); } catch (URISyntaxException e) { throw new IllegalStateException("not a valid URI: " + uri, e); } } HttpHeadersBase(int sizeHint);   HttpHeadersBase(HttpHeadersBase parent, boolean shallowCopy);   HttpHeadersBase(HttpHeaderGetters parent); @Nullable @Override MediaType contentType(); @Override final boolean isEndOfStream(); @Override final int hashCode(); @Override boolean equals(@Nullable Object o); @Override final String toString();  }
@Test void testUri() { final HttpHeadersBase headers = newHttp2Headers(); assertThat(headers.uri()).isEqualTo(URI.create("https: }