lang
-
Convert String to byte array ASCII encoding
This is an example of how to convert a String to byte array with ASCII encoding. The String class represents…
Read More » -
Convert String to byte array UTF encoding
public static byte[] stringToBytesUTFCustom(String str) { byte[] b = new byte[str.length() << 1]; for(int i = 0; i < str.length();…
Read More » -
Code injection with Java Proxy example
I was using JDBC PreparedStatement’s batch updates to modify a lot of data in a database and the processing was…
Read More » -
MethodHandle example
public class MethodAccessExampleWithArgs { private final int i; public MethodAccessExampleWithArgs(int i_) { i = i_; } private void bar(int j,…
Read More »