Escrever em arquivo usando outputStream

1 resposta
Gizelma
Oi Pessoal, To precisando escrever em um arquivo texto remotamente, só que dá erro com o seguinte codigo: Alguem poderia me ajudar??? :oops:
public void writeData(String output) throws IOException {
       StringBuffer b = new StringBuffer();
        OutputStream is = null;
        HttpConnection c = null;
        byte[] auxByte = output.getBytes();
        
        try {
            c = (HttpConnection)Connector.open(url);
            c.setRequestMethod(HttpConnection.POST);
            is = c.openOutputStream();
            is.write(auxByte);
                    
        }catch(IOException e){
            System.out.print(e);
        }
        finally {
           is.close(); 
           c.close();
        }
    }

1 Resposta

W

qual erro??

Criado 15 de dezembro de 2004
Ultima resposta 15 de dez. de 2004
Respostas 1
Participantes 2