- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Charset c =
String charsetName;Charset.forName(charsetName)
Charset.defaultCharset()
ContentType contentType;contentType.getCharset()
- Smart code suggestions by Codota
}
private static byte[] toBytesHexEscaped(byte[] s) { byte[] output = new byte[(s.length - 2) / 2]; for (int i = 0; i < output.length; i++) { byte b1 = gethex(s[2 + i * 2]); byte b2 = gethex(s[2 + i * 2 + 1]); // squid:S3034 // Raw byte values should not be used in bitwise operations in combination with shifts output[i] = (byte) ((b1 << 4) | (b2 & 0xff)); } return output; }