MCPcopy Create free account
hub / github.com/grpc/grpc-java / setFragment

Method setFragment

api/src/main/java/io/grpc/Uri.java:836–840  ·  view source on GitHub ↗

Specifies the fragment component of the new URI (not including the leading '#'). The fragment can contain any string of codepoints. Codepoints that can't be encoded literally will be percent-encoded for you as UTF-8. NB: Choose carefully between this method and {@link #setRawFragment(String)

(@Nullable String fragment)

Source from the content-addressed store, hash-verified

834 * @return this, for fluent building
835 */
836 @CanIgnoreReturnValue
837 public Builder setFragment(@Nullable String fragment) {
838 this.fragment = percentEncode(fragment, fragmentChars);
839 return this;
840 }
841
842 /**
843 * Specifies the fragment component of the new URI, already percent-encoded, exactly as it will

Calls 1

percentEncodeMethod · 0.80