@Test public void testJsonArrayToList() { JsonArray ary = new JsonArray(); ary.add("test"); ary.add("test1"); ary.add("test2"); List<String> list = ByteUtils.jsonArrayToStringList(ary); assertEquals("test", list.get(0)); assertEquals("test1", list.get(1)); assertEquals("test2", list.get(2)); }
public static List<String> jsonArrayToStringList(JsonArray array) { List<String> ary = new ArrayList<>(); for (JsonElement jsonElement : array) { ary.add(jsonElement.getAsString()); } return ary; }
ByteUtils { public static List<String> jsonArrayToStringList(JsonArray array) { List<String> ary = new ArrayList<>(); for (JsonElement jsonElement : array) { ary.add(jsonElement.getAsString()); } return ary; } }
ByteUtils { public static List<String> jsonArrayToStringList(JsonArray array) { List<String> ary = new ArrayList<>(); for (JsonElement jsonElement : array) { ary.add(jsonElement.getAsString()); } return ary; }  }
ByteUtils { public static List<String> jsonArrayToStringList(JsonArray array) { List<String> ary = new ArrayList<>(); for (JsonElement jsonElement : array) { ary.add(jsonElement.getAsString()); } return ary; }  static byte[] md5(byte[] data); static byte[] sha1(byte[] data); static byte[] intToByteMSB(int in); static int bytesToIntMSB(byte[] bytes); static byte[] shortToByteMSB(short in); static byte[] stringToBytes(String input); static String byteAryToAscii(byte[] in); static List<String> jsonArrayToStringList(JsonArray array); }
ByteUtils { public static List<String> jsonArrayToStringList(JsonArray array) { List<String> ary = new ArrayList<>(); for (JsonElement jsonElement : array) { ary.add(jsonElement.getAsString()); } return ary; }  static byte[] md5(byte[] data); static byte[] sha1(byte[] data); static byte[] intToByteMSB(int in); static int bytesToIntMSB(byte[] bytes); static byte[] shortToByteMSB(short in); static byte[] stringToBytes(String input); static String byteAryToAscii(byte[] in); static List<String> jsonArrayToStringList(JsonArray array); static final Charset DEF_CHARSET; }