getting 0 all the time.....public static int ReadInt(FileInputStream f) { try { int x = 0; int b = f.read(); x += b; x = x << 8; b=f.read(); x += b; x = x << 8; b=f.read(); x += b; x = x << 8; b=f.read(); x += b; } catch (Exception e) { } return x; }