Continuing the discussion from How can I get attachment on couchbase server via Java SDK for my system?:
Couchbase Mobile doesn’t support use of the regular Couchbase Java SDK because it adds it’s own metadata for attachments. This is covered in the documentation.
I think you’re looking for a code example of using the Sync Gateway REST interface to get to the document+attachment. Moving this to a linked topic in the other category.