Este código mostra como salvar informações em um arquivo

 

    // Se o arquivo não existir, será criado automaticamente
    try {
        BufferedWriter out = new BufferedWriter(new FileWriter("outfilename"));
        out.write("aString");
        out.close();
    } catch (IOException e) {
    }