Bom estou tentando fazer com que o cliente receba os dados do servidor, debuggando percebi que ele para nesta linha:
HelperSocket.receiveFile(openFileOutput(fname, Context.MODE_WORLD_READABLE));
for (int i = 0; i < colsname.size(); i++) {
g.writeObjectFieldStart("col" + String.valueOf(i));
g.writeStringField("name", colsname.get(i));
g.writeArrayFieldStart("data");
col = this.getColumn(i);
for (int j = 0; j < col.size(); j++, amtCols++) {
Object o = col.get(j);
// writeObject does not play well along with Timestamp objects
if (col.get(j).getClass() == Timestamp.class) {
o = o.toString();
}
g.writeObject(o);
}
col = this.getColumn(i);
public void getData() {
File sendFile = null;
BufferedInputStream bis = null;
OutputStream os = null;
try {
// Transforms the processed Data object in a JSON file
// the parameter is the name of the Manager
// a file pointer is returned
sendFile = this.data.makeJson("ProfileManager");
byte [] filearr = new byte [(int) sendFile.length()];
// reads the file into the byte array
bis = new BufferedInputStream(new FileInputStream(sendFile));
bis.read(filearr, 0, filearr.length);
os = this.connection.getOutputStream();
System.out.println(os);
os.write(filearr, 0, filearr.length);
os.flush();
os.close();/**/
this.connection.close();
} catch (Throwable ex) {
Logger.getLogger(CouponManager.class.getName()).log(Level.SEVERE, null, ex);
}/**/
}
sendFile = this.data.makeJson("ProfileManager");
else if ("getData".equals(navNd.get("name").asText())){
this.getData();
}