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

Method quoteComponent

lib/java/net/URI.java:822–834  ·  view source on GitHub ↗
(String component, String legalset)

Source from the content-addressed store, hash-verified

820 * component s @return java.lang.String the converted string
821 */
822 private String quoteComponent(String component, String legalset) {
823 try {
824 /*
825 * Use a different encoder than URLEncoder since: 1. chars like "/",
826 * "#", "@" etc needs to be preserved instead of being encoded, 2.
827 * UTF-8 char set needs to be used for encoding instead of default
828 * platform one
829 */
830 return URIEncoderDecoder.quoteIllegal(component, legalset);
831 } catch (UnsupportedEncodingException e) {
832 throw new RuntimeException(e.toString());
833 }
834 }
835
836 /**
837 * Compares this URI with the given argument {@code uri}. This method will

Callers 1

URIMethod · 0.95

Calls 2

quoteIllegalMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected