- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathByteArray.java
More file actions
Latest commit
24 lines (22 loc) · 534 Bytes
/
Copy pathByteArray.java
File metadata and controls
24 lines (22 loc) · 534 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
packagesepidsal;
importjava.io.*;
/**
*
* @author Sepideh Saljooghi
*/
publicclassByteArray {
publicstaticvoidmain(Stringargs[]){
try{
byte[] bas={10,20,30,40,40,60,70,80,90};
ByteArrayInputStreambais = newByteArrayInputStream(bas);
inti=0;
while((i=bais.read())!=-1){
charch = (char)i;
System.err.println("Ascii Value is:" + i + " Charachter is:" + ch);
}
}
catch(Exceptione){
System.out.print(e);
}
}
}