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)
| 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 | /** |