And since there is no alteration of the indexes etc during such operations, is there a better way?
Hm. I can’t think of better ways (but there will be some, as usual ;). Suggestions from other users are welcome.
isn't there a corresponding retrieve method on the Java client, similar to the store method?
Just use RETRIEVE or db:retrieve() (with BaseX 8.4, binary resources will directly be returned in their binary representation [1]). Please note that you’ll have to specify an output stream for your client, because the result cannot be returned as string.
[1] http://docs.basex.org/wiki/XQuery_Extensions#Serialization