users@jersey.java.net

Raw stream processing at server side filter

From: Zoltan Arnold NAGY <Zoltan.Nagy_at_Sun.COM>
Date: Fri, 09 Oct 2009 16:06:45 +0200

Hi,

Okay, I've managed to hash the entity on the client side. Now I'm having
problem the server side.. :)


I've created a filter which implements ContainerRequestFilter. Inside
that, I'm trying to do this:
        try {
            byte[] bytes =
IOUtils.toByteArray(request.getEntityInputStream());
            log.info("" + bytes.length);
        } catch(IOException e) {
            e.printStackTrace();
        }

interesingly enough, the value gets logged, but I get two stackstraces
available at http://nagyz.pastebin.com/mfabc115

am I doing it the wrong way? :)

Thanks,
Zoltan