metacat client uses in-memory buffer for posting data
The size of XML files (and probably data files) that can be sent to metacat is memory limited in client applications because the MetacatClient implementation assumes the payload can be loaded into a memory buffer before it is sent. This is done to calculate the size of the payload before POSTing it. We need new insert(), update(), and upload() methods that take a size parameter so that the Reader or InputStream can be streamed directly over the http connection instead of being accumulated in an in-memory buffer.
We have code that does this in Morpho already using Apache's httpclient library, but this should make its way into MetacatClient. With JDK after 1.5.x, Sun's http protocol handler now supports streaming POSTs, but you have to set up a separate HttpURLConnection with a new protocol handler and call setFixedLengthStreamingMode(). See:
This would be an alternative to using httpclient, but probably still requires registering a newly configured protocol handler.
We also may have trouble with Metacat, because it also reads data using a string, as described in bug # 1122.