Refactor the function reading JPEG any types. Checked with both openJDK and HotSpot