Last active
December 20, 2015 16:19
-
-
Save marciojrtorres/6160579 to your computer and use it in GitHub Desktop.
Falando em coincidência, este código SEMPRE funciona?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void armazena(String texto) throws Exception { | |
FileWriter fw = new FileWriter("/tmp/app-temp.txt", true); | |
fw.write(s); | |
fw.flush(); | |
fw.close(); | |
} | |
public static String recupera() throws Exception { | |
BufferedReader br = new BufferedReader(new FileReader("/tmp/app-temp.txt")); | |
String linha = null; | |
String conteudo = ""; | |
while((linha=br.readLine()) != null) { | |
conteudo += linha; | |
} | |
br.close(); | |
return conteudo; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment