users@jersey.java.net

[Jersey] Compression/Encryption in Jersey

From: tyo07 <email.tyo_at_gmail.com>
Date: Wed, 9 Nov 2011 02:12:41 -0800 (PST)

Hi, i have little problem with compression in Jersey. Using a simple
compression from string to byte for example

//Server
public String method()
{
  return compressThis("a String") <- this will return as a byte[] in my
compression method
}


//client
String getStrComp = webResource.accept some path <- this one will call that
method above. Calling a function that returned as String of byte, and fill
it into string..sounds strange.

problem is, returned string is not the same again like one before
compression. I might be wrong at this but looks like string that returned to
client is not returned like true string of "byte". I think it's malformed or
something.

Getting this problem, i try to look another method and see GZIP encoding in
jersey but don't really understand the purpose. Is it planted on server? and
it automatically set the header so if no header sent to the server, then the
information that sent back to the client was encoded?how to re-decode it
again at client side?

Is there any easier method to encrypt/compression in Jersey?
Thanks



--
View this message in context: http://jersey.576304.n2.nabble.com/Compression-Encryption-in-Jersey-tp6977449p6977449.html
Sent from the Jersey mailing list archive at Nabble.com.