MCPcopy Index your code
hub / github.com/OpenFeign/feign / pctEncode

Method pctEncode

core/src/main/java/feign/template/UriUtils.java:179–185  ·  view source on GitHub ↗

Percent Encode the provided byte. @param data to encode @param bos with the output stream to use.

(byte data, ByteArrayOutputStream bos)

Source from the content-addressed store, hash-verified

177 * @param bos with the output stream to use.
178 */
179 private static void pctEncode(byte data, ByteArrayOutputStream bos) {
180 bos.write('%');
181 char hex1 = Character.toUpperCase(Character.forDigit((data >> 4) & 0xF, 16));
182 char hex2 = Character.toUpperCase(Character.forDigit(data & 0xF, 16));
183 bos.write(hex1);
184 bos.write(hex2);
185 }
186
187 private static boolean isAlpha(int c) {
188 return (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z');

Callers 1

encodeChunkMethod · 0.95

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected