java.net.URI is a class that represents a Uniform Resource Identifier, which is used to identify a resource on the internet. The getRawFragment() method in this class returns the fragment component of the URI as a string.
Example:
URI uri = new URI("https://www.example.com/page#section"); String fragment = uri.getRawFragment(); System.out.println(fragment);
Output: section
In this example, a URI object is created with the string "https://www.example.com/page#section". The getRawFragment() method is called on this object, which returns the string "section", representing the fragment component of the URI.
Package library: This class is located in the java.net package.
Java URI.getRawFragment - 15 examples found. These are the top rated real world Java examples of java.net.URI.getRawFragment extracted from open source projects. You can rate examples to help us improve the quality of examples.