Compress & Send Object from EJB -> Client

Discussions

EJB programming & troubleshooting: Compress & Send Object from EJB -> Client

  1. Hi,

    I would like to compress the data(object) that I would be sending from EJB to client(java). I don't want to create a zip file of that data and send it. I am looking for compressed byte stream/object to be send to the client. At the client I decompress byte stream/object. Help me if any one has idea about this.

    Thanks in advance.

    -Janardhan.
  2. Hi,
        Form this link you will get an idea about how to compress the response.

    http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html

    Well this link explains about the filters but you can use GZIPInputStream, GZIPOutputStream etc to compress the response. Just curious why you want to compress it.

    Hope that helps.

    Sawan