I have a JPEG image stored as a stream in my database. I read that into a byte[] array, and then I'm trying to serve that using a Restlet Resource. My resource class returns an InputRepresentation made of the byte[] array and MediaType.IMAGE_JPEG. The result when I test from a browser is that the correct number of bytes get streamed, but when rendered the image looks jumbled and corrupt. Had anyone had success doing something like this?
Stokes.

