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 av a 2s. com import org.json.JSONArray; import android.database.Cursor; import android.database.MatrixCursor; import br.com.rafael.jpdroid.converters.JpdroidCsvConverter; import br.com.rafael.jpdroid.converters.JpdroidJsonConverter; import br.com.rafael.jpdroid.converters.JpdroidXmlConverter; import br.com.rafael.jpdroid.converters.JpdroidMatrixCursorConverter; /** * Classe respons?vel pela convers?o de objetos. * * @author Rafael Centenaro * */ public class JpdroidConverter { public static JSONArray toJson(Cursor cursor) throws Exception { return JpdroidJsonConverter.toJson(cursor); } public static JSONArray toJson(Object object) throws Exception { return JpdroidJsonConverter.toJson(object); } public static String toXml(Cursor cursor) throws Exception { return JpdroidXmlConverter.toXml(cursor); } public static String toXml(Object object) throws Exception { return JpdroidXmlConverter.toXml(object); } public static String toCsv(Cursor cursor) throws Exception { return JpdroidCsvConverter.toCsv(cursor); } public static String toCsv(Object object) throws Exception { return JpdroidCsvConverter.toCsv(object); } public static MatrixCursor toMatrixCursor(Object entity){ return JpdroidMatrixCursorConverter.toMatrixCursor(entity); } public static MatrixCursor toMatrixCursor(Object entity, boolean onlyColumn){ return JpdroidMatrixCursorConverter.toMatrixCursor(entity,onlyColumn); } }