Advertisement
sky_el

Чтение файла побайтно Java

Feb 23rd, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. package IO;
  2.  
  3. import java.io.DataInputStream;
  4. import java.io.FileInputStream;
  5. import java.io.IOException;
  6.  
  7. /**
  8.  * Created by Sky_el on 23.02.2017.
  9.  */
  10. public class TestEOF {
  11.     public static void main(String[] args) throws IOException {
  12.         DataInputStream in = new DataInputStream(new FileInputStream("src/IO/TestEOF.java"));
  13.         while(in.available() != 0) {
  14.             System.out.print((char)in.readByte());
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement