Hi,
One of the projects that I did (https://www.freelancer.com/jobs/project-20626478/) involved calling the Google Analytics API. However it was in Perl, which means I was forced to do the OAuth token retrieval manually (as opposed to use the Google library). I was able to figure it out, so I now know how the token renew process should work. My main language is Python, so I can deliver you Python code. If you want Java, it will take a little longer while I translate my Python to Java.