Mapping Long values to Integer values ?
Hi I have a task I run in the back-end (a file download) and I'd like to display a progressbar. the progressbar however only accepts ints as max value and current value. now I was wondering, what would be the best way (and preferrably also the most performant way) to map the Long values to Int values.
atm I'm thinking of using a division by 4294967298 (plus or minus one) which is Long.MAX_VALUE divided by Integer.MAX_VALUE and would provide the most accurate mapping. however I think a better method is possible so I'm asking if anyone has any ideas.

