From 8d1d8d845beb6bc6c99d90722169b77c3dff91e7 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Fri, 30 Aug 2013 13:48:38 +0700 Subject: Messages --- src/com/juick/json/Messages.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/com/juick/json/Messages.java (limited to 'src/com/juick/json/Messages.java') diff --git a/src/com/juick/json/Messages.java b/src/com/juick/json/Messages.java new file mode 100644 index 00000000..a1879b09 --- /dev/null +++ b/src/com/juick/json/Messages.java @@ -0,0 +1,27 @@ +package com.juick.json; + +import java.util.ArrayList; +import java.util.Iterator; + +/** + * + * @author ugnich + */ +public class Messages { + + public static String arrayToString(ArrayList messages) { + String json = "["; + + Iterator i = messages.iterator(); + while (i.hasNext()) { + com.juick.Message m = i.next(); + if (json.length() > 1) { + json += ","; + } + json += Message.toJSON(m).toString(); + } + + json += "]"; + return json; + } +} -- cgit v1.2.3