(Java) Leer un archivo modo de texto

try {
    File f = new File("C:\\");
    FileReader fr = new FileReader(f);
    char[] cbuf = new char[(int)f.length()];
    fr.read(cbuf);
    String content = new String(cbuf);
} catch (IOException iOException) {
}

No hay comentarios:

Publicar un comentario

Gracias por tu comentario. Tú opinión es muy valiosa.