how to create 16 byte array in java from string code example Example: String by byte array in java String str = "Example String"; byte[] b = str.getBytes();