On Thu, 2015-02-26 at 19:04 +1100, Brett Ryan wrote: > > Since I produce the xml in memory, that's the way Marshal.marshal method > > works, I could use the ByteArrayEntity using the byte[] from the > > ByteArrayOutputStream supplied to marshal. > > > Could you not do something like > > PipedOutputStream out = new PipedOutputStream(); > InputStream instr = new PipedInputStream(out); > marshaller.marshal(object, out); > HttpPost post = new HttpPost(); > post.setEntity(new InputStreamEntity(instr)); >
A custom HttpEntity implementation that internally makes use of JAXB marshaling would be massively more efficient. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org