activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: Read data from BytesMessage multiple times?
Date Wed, 23 Feb 2011 19:21:26 GMT
On Wed, 2011-02-23 at 14:13 -0500, Paul Pearcy wrote:
> Hello,
>   Is it possible to read the data from a BytesMessage multiple times? After I read the
data from the message the first time, the DataInputStream dataIn member ends up getting consumed
and I don't see a way to reset the InputStream to allow it to be read again. After reading
the data from the message, I can pass around that byte[] with the message, but that feels
a little clunky.
> 
> Thanks,
> Paul

Try BytesMessage.reset() that should do the trick.

Regards


-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/



Mime
View raw message