-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataInput.java
More file actions
21 lines (19 loc) · 563 Bytes
/
DataInput.java
File metadata and controls
21 lines (19 loc) · 563 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.io.*;
public class DataInput {
public static void main(String args[]){
try{
InputStream input = new FileInputStream("D:\\faradars.txt");
DataInputStream dis = new DataInputStream(input);
int count = input.available();
byte[] array = new byte[count];
dis.read(array);
for(byte bt:array){
char chr=(char) bt;
System.out.print(chr);
}
}
catch(Exception e){
System.out.print(e);
}
}
}