MCPcopy Index your code
hub / github.com/apache/tomcat / urlEncode

Method urlEncode

java/org/apache/tomcat/util/buf/UEncoder.java:127–136  ·  view source on GitHub ↗
(CharChunk out, ByteChunk bb)

Source from the content-addressed store, hash-verified

125 }
126
127 private void urlEncode(CharChunk out, ByteChunk bb) throws IOException {
128 byte[] bytes = bb.getBuffer();
129 for (int j = bb.getStart(); j < bb.getEnd(); j++) {
130 out.append('%');
131 char ch = Character.forDigit((bytes[j] >> 4) & 0xF, 16);
132 out.append(ch);
133 ch = Character.forDigit(bytes[j] & 0xF, 16);
134 out.append(ch);
135 }
136 }
137
138 // -------------------- Internal implementation --------------------
139

Callers 1

encodeURLMethod · 0.95

Calls 4

getBufferMethod · 0.65
getStartMethod · 0.45
getEndMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected