MCPcopy Create free account
hub / github.com/davidgiven/luje / toString

Method toString

lib/java/net/URI.java:1629–1663  ·  view source on GitHub ↗

Returns the textual string representation of this URI instance. @return the textual string representation of this URI.

()

Source from the content-addressed store, hash-verified

1627 * @return the textual string representation of this URI.
1628 */
1629 @Override
1630 public String toString() {
1631 if (string == null) {
1632 StringBuilder result = new StringBuilder();
1633 if (scheme != null) {
1634 result.append(scheme);
1635 result.append(':');
1636 }
1637 if (opaque) {
1638 result.append(schemespecificpart);
1639 } else {
1640 if (authority != null) {
1641 result.append("//"); //$NON-NLS-1$
1642 result.append(authority);
1643 }
1644
1645 if (path != null) {
1646 result.append(path);
1647 }
1648
1649 if (query != null) {
1650 result.append('?');
1651 result.append(query);
1652 }
1653 }
1654
1655 if (fragment != null) {
1656 result.append('#');
1657 result.append(fragment);
1658 }
1659
1660 string = result.toString();
1661 }
1662 return string;
1663 }
1664
1665 /*
1666 * Form a string from the components of this URI, similarly to the

Callers 1

toASCIIStringMethod · 0.95

Calls 2

appendMethod · 0.95
toStringMethod · 0.95

Tested by

no test coverage detected