Bitbucket Pre-receive hook question

Hello - I have a question about using Bitbucket API in Java to get a changeset for a pre-receive hook. I am able to follow the sample code here (Bitbucket) to create the hook. I am able to get the commit message information. However, I need to be able to get the changeset for each commit (example, the commit files, the path, the file content, whether the file is a add, modify or delete). What library should I use to get this information? Is there a sample code I can use? Thank you very much in advance.