I have a .dat file. In this file, there are int string int int double characters in tabular form, respectively. I want to read and print these, I tried every method and also i want to assign values to a class i created class but i cant take datas. Help!
try(FileInputStream fis = new FileInputStream(dosyaYolu)){
DataInputStream dis = new DataInputStream(fis);
for(int i=0;i<100;i++){
System.out.println(dis.readUnsignedByte());
System.out.println(dis.readUTF());
System.out.println(dis.readUnsignedByte());
System.out.println(dis.readUnsignedByte());
System.out.println(dis.readUnsignedByte());
}
}catch (IOException e){
e.printStackTrace();
}
New contributor
Furkan Kocaman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.