Back to project page jpdroid.
The source code is released under:
GNU General Public License
If you think the Android project jpdroid 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 br.com.rafael.jpdroid.util; /* ww w . j a va 2 s .c om*/ import br.com.rafael.jpdroid.core.JpdroidWriteFile; import android.database.Cursor; /** * Classe respons?vel por exportar arquivos no formato CSV para o cart?o de mem?ria. * * @author Rafael Centenaro */ public class JpdroidCsvFile extends JpdroidWriteFile { public static void export(Cursor cursor) { export(cursor, "CsvFile" + getDateNow() + ".csv"); } public static void export(Cursor cursor, String fileName) { String card_string; try { card_string = JpdroidConverter.toCsv(cursor).toString(); writeFile(card_string, fileName); } catch (Exception e) { e.printStackTrace(); } } public static void export(Object entity) { export(entity, "CsvFile" + getDateNow() + ".csv"); } public static void export(Object entity, String fileName) { String card_string; try { card_string = JpdroidConverter.toCsv(entity).toString(); writeFile(card_string, fileName); } catch (Exception e) { e.printStackTrace(); } } }