Read unsigned byte from file using DataInputStream
import java.io.DataInputStream;
import java.io.FileInputStream;
publicclass Main {
publicstaticvoid main(String[] args) throws Exception {
FileInputStream fin = new FileInputStream("C:/UnsignedByte.txt");
DataInputStream din = new DataInputStream(fin);
int i = din.readUnsignedByte();
System.out.println("Unsinged byte value : " + i);
din.close();
}
}