All performance statistics (including campaign spend) are accessible via API reports. The Reporting Basics and Reporting Concepts guides are a good place to start if you are new to reporting. In addition, if you're interested in campaign-level data, you'll most likely want to use the Campaign Performance Report and include the Cost field.
Regarding the Java library, we have examples of how to run reports in the reporting folder. Please check those out and let me know if you still have questions.