You can check ns_conn contentlength in advance and decide to get all the content or to discard it (because too large). You can use ns_conn setmaxinput to some large(r) value and then call ns_queryget. The ns_queryget will call Ns_ConnContent and this is now clever to either return the content from memory (if < maxreadahead) or do more complex stuff by mapping file and sinking all the content in a memmaped file. The returned byte array for futher parsing would be just from the mmaped file. The callers of the Ns_ConnContent will not see the difference.
I understand that but my question is: How and when all content will be downloaded? By the driver? By the conn thread on first call? Currently driver reads everything into memory.