FileInputStream fis = null;
DataInputStream dis = null;
try{
fis = new FileInputStream("data.bin");
dis = new DataInputStream(fis);
boolean b = dis.readBoolean();
byte b2 = dis.readByte();
int i = dis.readInt();
double d = dis.readDouble();
String s = dis.readUTF();
}catch (Exception e) {
// TODO: handle exception
}finally{
try{
fis.close();
dis.close();
}catch (Exception e) {
// TODO: handle exception
}
}