Here you can find the source of convertStringToByte(String input)
public static byte[] convertStringToByte(String input)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] convertStringToByte(String input) { return input == null ? new byte[0] : input.getBytes(); }//ww w. jav a 2 s.co m }