|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.android.activityminer.logic.util.CSVUtils
public class CSVUtils
Utility class for data export in CSV format
| Constructor Summary | |
|---|---|
CSVUtils()
|
|
| Method Summary | |
|---|---|
static String |
asCsvString(String string)
Does quote a string to a CSV representation |
static String |
fromCsvString(String string)
Does remove CSV quotes from a string |
static String[] |
readCSVHeader(BufferedReader reader)
Does read the attribute names from an CSV header. |
static String[] |
readCSVRow(BufferedReader reader)
Does read a CSV row into a String array. |
static Activity |
readCSVRow(BufferedReader reader,
String[] attributes,
android.support.v4.util.LongSparseArray<String> cNamesPerId)
Does generate a training sample from a CSV row entry. |
static void |
writeCSVHeader(TrainingActivity activity,
PrintWriter writer)
Does generate a CSV row from a training sample. |
static void |
writeCSVRow(String[] values,
PrintWriter writer)
Does generate a CSV file row from a String array. |
static void |
writeCSVRow(TrainingActivity activity,
String activityName,
PrintWriter writer)
Does generate a CSV header from a training sample. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CSVUtils()
| Method Detail |
|---|
public static final String fromCsvString(String string)
string - the string to convert
public static final String asCsvString(String string)
string - the string to convert to a csv string
public static final void writeCSVRow(String[] values,
PrintWriter writer)
values - the values to generate CSV row fromwriter - the writer to use
public static final String[] readCSVRow(BufferedReader reader)
throws IOException
reader - the reader to use
IOException
public static final void writeCSVRow(TrainingActivity activity,
String activityName,
PrintWriter writer)
activity - the training sample to generate CSV header fromactivityName - the activity class namewriter - the writer to use
public static final void writeCSVHeader(TrainingActivity activity,
PrintWriter writer)
activity - the training sample to generate CSV row fromwriter - the writer to use
public static final Activity readCSVRow(BufferedReader reader,
String[] attributes,
android.support.v4.util.LongSparseArray<String> cNamesPerId)
throws IOException
reader - the reader to useattributes - the attributes from the headercNamesPerId - the class name to unique class identifier mapping
IOException
public static final String[] readCSVHeader(BufferedReader reader)
throws IOException
reader - the reader to use
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||