We have frequently been asked how to export events from Splunk using the Java SDK.
We now have a Java SDK example that shows how to export events from Splunk to a file. This is often done for compliance purposes when data need to be stored in a particular way for a particular period of time.
There are more details on the application on our developer site.
You can stay up to date on the latest developments by following us on Twitter: @splunkdev