Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save strongant/6651bcf8577ef692e32885a001d3caba to your computer and use it in GitHub Desktop.
Save strongant/6651bcf8577ef692e32885a001d3caba to your computer and use it in GitHub Desktop.
try {
//String sourcePath="https://gist.githubusercontent.com/CootCraig/6186298/raw/26fb35a849fac60cb3653e9b8b9877af5ce39f66/logger.js";
//readHtmlFile(sourcePath);
FileInputStream fs = new FileInputStream("/home/devbwh/IdeaProjects/test/src/1.txt");
byte[] buffer = new byte[1024];
int content;
while ((content = fs.read()) != -1) {
// convert to char and display it
System.out.print((char) content);
}
fs.close();
} catch (Exception e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment