MCPcopy Create free account
hub / github.com/apache/tomcat / encode

Method encode

java/org/apache/coyote/http2/HPackHuffman.java:524–531  ·  view source on GitHub ↗

Encodes the given string into the buffer. If there is not enough space in the buffer, or the encoded version is bigger than the original it will return false and not modify the buffers position. @param buffer The buffer to encode into @param toEncode The string to encode @param forceL

(ByteBuffer buffer, String toEncode, boolean forceLowercase)

Source from the content-addressed store, hash-verified

522 * @deprecated Unused. This method will be removed in Tomcat 12 onwards.
523 */
524 @Deprecated
525 public static boolean encode(ByteBuffer buffer, String toEncode, boolean forceLowercase) {
526 if (forceLowercase) {
527 return encode(buffer, toEncode.toLowerCase(Locale.ENGLISH));
528 } else {
529 return encode(buffer, toEncode);
530 }
531 }
532
533
534 /**

Callers 3

testValueLeftBraceMethod · 0.95

Calls 10

encodeIntegerMethod · 0.95
remainingMethod · 0.80
lengthMethod · 0.80
positionMethod · 0.80
charAtMethod · 0.80
hasRemainingMethod · 0.80
getStringMethod · 0.65
toStringMethod · 0.65
putMethod · 0.65
valueOfMethod · 0.45

Tested by 1

testValueLeftBraceMethod · 0.76