users@jersey.java.net

WebResource, Put and OutputStream?

From: Johannes Schneider <mailings_at_cedarsoft.com>
Date: Wed, 10 Nov 2010 10:29:39 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi guys,


I try to execute a put to a WebResource. This works well, when using an
InputStream as entity.

But this forces me to always use an ByteArray(Input/Output)Stream
scenario. I'd prefer to get an OutputStream from the put() call and use
that for my serializers...

I am sure there must be a way - just couldn't find it...


Something like:

WebResource webResoure = ....

OutputStream out = someMagic(webResoure)...
myOwnSerializingStuff.serialize(out);
out.close();

ClientResponse response = ...;


Any ideas?



Thanks,

Johannes


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJM2mX/AAoJEAytD9R7Qv6d814H/RYjfYIGfDMvTUvnuLewtNZs
FhQqmbotIFYVJEQoqMlXJbP+r9fzuOIRC79GLazpKWHRV5Ox11NHzbzdrh3XYZsI
AwazfSNrp4paxISf3fZ1YzbvGf8CMn0FODXVY0HCDK8MnwIcnf381JLms9gDXzoq
Ft/oXdDHmysRO8F/UAzVMPOzo44hO2JKODVy1KjQPHrLOcfjSR9LMW82rACWPu8Z
x7KwZR5F8nSz414Y5TuFYevkQytFolty1w3BXvVDOvnkK3HUEp0Wt/tf847X00nd
a1nRt2151AVZEqHWARgifbbPPh8A6pJ5MkccttLwX1SrYEm/j08QsHuD+FLH5WQ=
=YHDV
-----END PGP SIGNATURE-----