Code example for CharArrayWriter

Methods: toString

0
		resetCollecting(); 
	} 
 
	private static String listToString(ArrayList<Location> ul, int instanceid, int categoryid) {
		CharArrayWriter gpxoutput = new GpxCharArrayWriter(ul, instanceid, categoryid);
		String gpxstring = gpxoutput.toString();
		return gpxstring;
	} 
 
	private void scheduleSending() { 
		HttpClient httpclient = new DefaultHttpClient(m_httpParameters);
		HttpPost httppost = new HttpPost(m_server + "home/gpxUpload"); // FIXME: Different URL for GPX upload!
		final String displaytime = m_dateFormatter.format(new Date(m_sendingLocations.get(m_sendingLocations.size() - 1).getTime())) + ": ";
 
		// Copied from http://www.anddev.org/upload_files_to_web_server-t443-s30.html 
		final String lineEnd = "\r\n";
		final String twoHyphens = "--";
		final String boundary = "*****";
		httppost.setHeader("Content-Type", "multipart/form-data; boundary="+boundary);
 
		String gpxstring = listToString(m_sendingLocations, m_instanceid, m_categoryId);