Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.FileInputStream;
- import java.io.IOException;
- public class Main {
- public static void main(String[] args) throws IOException {
- String path = "D:\\Coding" +
- "\\BG_Softuni\\Java Advanced - January 2019" +
- "\\04. Java-Advanced-Fiels-and-Directories-Lab" +
- "\\04. Java-Advanced-Files-and-Streams-Lab-Resources\\input.txt";
- FileInputStream file = new FileInputStream(path);
- int oneByte = file.read();
- while ((oneByte = inFile.read()) >= 0){
- System.out.print(Integer.toBinaryString(oneByte)+" ");
- }
- }
- }
Add Comment
Please, Sign In to add comment