"When I want to store byte array in the serialized form (mimetype: application/x-java-serialized-object) I can't get it back, because rest server returns it in raw form instead of serialized form.
the process is like this:
1. PUT bytearray in serialized form
2. rest server deserializes the bytearray and stores it in deserialized (raw) form
3. GET byte array (expecting serialized form)
4. rest server retrieves the byte array in raw form but doesn't serialize it, instead streams it in raw form - because of the above mentioned code.