How to access document attachments with Java SDK?

So you confirm that I need to use the SDK in order to query views, retrieving document IDs, and then use the REST API to retrieve the documents themselves?