Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class Main {
- public static void main(String[] args) {
- FileInputStream in = null;
- try {
- in = new FileInputStream("in.txt");
- byte[] b = new byte[in.available()];
- in.read(b);
- for(int i = 0; i < b.length; i++) {
- System.out.write(b[i]);
- }
- }
- catch (IOException ex) {
- System.out.println(ex);
- }
- finally {
- try {
- if(in != null)
- in.close();
- }
- catch (IOException ex) {
- System.out.println(ex);
- }
- }
- System.out.flush();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement