2012-08-24 Mark Holland <mark@mark-holland.me.uk>

* src/pandroid/agent/PandroidAgentListener.java:
	Reverted to original writeFile method, changed
	xml encoding header to iso-8859-1

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6971 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
markholland 2012-09-13 15:16:56 +00:00
parent e85867f269
commit 4fbc5cc736
4 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2012-08-24 Mark Holland <mark@mark-holland.me.uk>
* src/pandroid/agent/PandroidAgentListener.java:
Reverted to original writeFile method, changed
xml encoding header to iso-8859-1
2012-09-12 Sergio Martin <sergio.martin@artica.es> 2012-09-12 Sergio Martin <sergio.martin@artica.es>
* src/pandroid/agent/PandroidAgent.java * src/pandroid/agent/PandroidAgent.java

View File

@ -207,7 +207,7 @@ public class PandroidAgentListener extends Service {
private String buildXML(){ private String buildXML(){
String buffer = ""; String buffer = "";
String gpsData = ""; String gpsData = "";
buffer += "<?xml version='1.0' encoding='utf-8'?>\n"; buffer += "<?xml version='1.0' encoding='iso-8859-1'?>\n";
String latitude = getSharedData("PANDROID_DATA", "latitude", "181", "float"); String latitude = getSharedData("PANDROID_DATA", "latitude", "181", "float");
String longitude = getSharedData("PANDROID_DATA", "longitude", "181", "float"); String longitude = getSharedData("PANDROID_DATA", "longitude", "181", "float");
@ -358,7 +358,7 @@ public class PandroidAgentListener extends Service {
private void writeFile(String fileName, String textToWrite) { private void writeFile(String fileName, String textToWrite) {
try { // catches IOException below try { // catches IOException below
/*
String UTF8 = "utf8"; String UTF8 = "utf8";
int BUFFER_SIZE = 8192; int BUFFER_SIZE = 8192;
@ -372,15 +372,15 @@ try { // catches IOException below
//ensure that everything is really written out and close //ensure that everything is really written out and close
bw.flush(); bw.flush();
bw.close(); bw.close();
/* */
FileOutputStream fOut = openFileOutput(fileName, MODE_WORLD_READABLE); FileOutputStream fOut = openFileOutput(fileName, MODE_WORLD_READABLE);
OutputStreamWriter osw = new OutputStreamWriter(fOut); OutputStreamWriter osw = new OutputStreamWriter(fOut);
// Write the string to the file // Write the string to the file
osw.write(textToWrite); osw.write(textToWrite);
/* ensure that everything is really written out and close */ /* ensure that everything is really written out and close */
//osw.flush(); osw.flush();
//osw.close(); osw.close();
} catch (IOException e) { } catch (IOException e) {
} }

View File

@ -113,7 +113,7 @@ class tentacle_client {
} catch (IOException e) { } catch (IOException e) {
getError("Could not get the file"); getError("Could not get the file");
} }
Log.v("MARK",data);
getInfo("*** Start of transference ***\n",verbose); getInfo("*** Start of transference ***\n",verbose);
// Send the file name and length // Send the file name and length
try { try {
@ -133,7 +133,7 @@ class tentacle_client {
if (serverResponse != null && serverResponse.equals("SEND OK")) { if (serverResponse != null && serverResponse.equals("SEND OK")) {
try { try {
getInfo("Client -> Server: [file data]\n", verbose); getInfo("Client -> Server: [file data]\n", verbose);
serverOutput.write(data.getBytes()); serverOutput.writeBytes(data);
} catch (IOException e) { } catch (IOException e) {
getError("Could not write on server"); getError("Could not write on server");