Intercepting Network calls while automating native application

Hi All,
I have a scenario where we need to capture the network call made by the application. Is there any way we can achieve that with java?

Scenario description:
The application makes a network call to server and plots the response received from the server. After plotting the data on view it makes tracking calls depending upon the user interaction.

For now we use fiddler or charles but we want to capture it programmatically. Is there any java equivalent for for these tools?

I know this is an old question but if you still have found the answer to your question… here is my 50 cents

  1. instead of intercepting you read the adb logcat from the device, I have done this in the past and it works perfectly.

  1. You can also use something called as little proxy to basically sniff the calls. I had lots of issues with it in the past and requires very advanced Java knowledge to keep it stable and working.