I am looking for the best way to add milliseconds to a Java Date when milliseconds is stored as a 'long'. Java calendar has an add function, but it only takes an 'int' as the amount.
This is one solution I am proposing...
Calendar now = Calendar.getInstance();
Calendar timeout = Calendar.getInstance();
timeout.setTime(token.getCreatedOn());
timeout.setTimeInMillis(timeout.getTimeInMillis() + token.getExpiresIn());
Any other suggestions?