April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Exemplo de Leitura
nLeitura de Arquivo
nimport java.io.*;
npublic class PrintFile {
n  public static void main(String[] args) {
n    try {
n      InputStream fin = new FileInputStream(args[0]);
n      InputStream in = new BufferedInputStream(fin);
n      int b;
n      while ((b = in.read()) != -1) {  System.out.print((char)b);   }
n    } catch (IOException e) {
n      System.out.println(e);              Exercícios – Questões 30
n    }
n  }
n}