The method which is used for converting string into bytes. code example
Example: String by byte array in java
String str = "Example String";
byte[] b = str.getBytes();
String str = "Example String";
byte[] b = str.getBytes();