aboutsummaryrefslogtreecommitdiff
path: root/src/com/juick/json/Messages.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-08-30 13:48:38 +0700
committerGravatar Ugnich Anton2013-08-30 13:48:38 +0700
commit8d1d8d845beb6bc6c99d90722169b77c3dff91e7 (patch)
treedce92d1d27f94c2c86f130223dcac52763c9e7cc /src/com/juick/json/Messages.java
parent40fe707e6566faa02eeba2e8f4830dbbd3992f4a (diff)
Messages
Diffstat (limited to 'src/com/juick/json/Messages.java')
-rw-r--r--src/com/juick/json/Messages.java27
1 files changed, 27 insertions, 0 deletions
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<com.juick.Message> messages) {
+ String json = "[";
+
+ Iterator<com.juick.Message> 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;
+ }
+}