- static public byte[] bytes(String str) {
- try {
- return str.getBytes("UTF-8");
- } catch (UnsupportedEncodingException e) {
- // All conforming JVM must support UTF-8
- e.printStackTrace();
- return null;
+ static public byte[][] getBytes(String[] strs) {
+ byte[][] bytes = new byte[strs.length][];
+ for (int i = 0; i < strs.length; i++) {
+ bytes[i] = StringUtils.getBytes(strs[i]);