import java.io.*;
public class FileInputTest {
public static void main(String[] args) {
try {
String path = "/Users/zaferteker/Private/Books/Documents/TestFile.txt";
FileInputStream fis = new FileInputStream(path);
int c;
// Dosyadaki tüm bilgi byte byte okunuyor.
while ((c = fis.read()) != -1) {
System.out.print((char) c);
}
fis.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Dosyayı İndir