Back to project page kluster-android.
The source code is released under:
Apache License
If you think the Android project kluster-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cs446.kluster.data.serialize; /*from w w w .java2s . c o m*/ import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.annotation.TargetApi; import android.util.JsonReader; /** * Created by Marlin Gingerich on 2014-03-10. */ public class SerializerUtils { @TargetApi(11) public static List<String> readStringArray(JsonReader reader) throws IOException { List<String> strings = new ArrayList<String>(); reader.beginArray(); while (reader.hasNext()) { strings.add(reader.nextString()); } reader.endArray(); return strings; } @TargetApi(11) public static List<Double> readDoublesArray(JsonReader reader) throws IOException { List<Double> doubles = new ArrayList<Double>(); reader.beginArray(); while (reader.hasNext()) { doubles.add(reader.nextDouble()); } reader.endArray(); return doubles; } }