Problema Servidor -- Cliente

0 respostas
B

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));
ja no servidor ele aponta estes erros:
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);
                
            }
especificamente na linha
col = this.getColumn(i);
outra parte em que o netbeans aponta o erro e esta :
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);
        }/**/
    }
especificamente em:
sendFile = this.data.makeJson("ProfileManager");
e aqui :
else if ("getData".equals(navNd.get("name").asText())){
                this.getData();

            }
Estou perdido, se alguem puder me dar uma luz, ficarei eternamente grato
Criado 8 de janeiro de 2013
Respostas 0
Participantes 1