java - How to send all value of database to outputstream -
i hava sqlitedatabase object called mydb . object can filled calling insertlocation method.
public boolean insertlocation(string time, double latitude, double longitude) { sqlitedatabase db = this.getwritabledatabase(); contentvalues cv = new contentvalues(); cv.put("time", time); cv.put("latitude", latitude); cv.put("longitude", longitude); db.insert("location", null, cv); homecoming true; }
now want set these info outputstream , how should this?
before homecoming
printwriter printwriter = new printwriter(file); printwriter.println("time=" + time); printwriter.println("latitude=" +latitude); printwriter.println("longitude=" + longitude);
i hope help!
java sqlite
No comments:
Post a Comment