> I have an array of bytes which contains binary data.
> How do I go about piping this data into a servlet output stream?
>
> PrintWriter out = response.getWriter();
> out.print(mybytes); //mybytes has type byte[]. This doesn't seem to work
I don't see any output when I do a view source....
I know it's binary, but still....
thanks
Luca
>> I have an array of bytes which contains binary data.
>> How do I go about piping this data into a servlet output stream?
[quoted text clipped - 5 lines]
> What exactly goes wrong? Sorry, but these two lines of Code don't give
> many hints as to what the actual problem is.
Stefan Schulz - 17 Sep 2004 13:04 GMT
> I don't see any output when I do a view source....
>
[quoted text clipped - 13 lines]
>> What exactly goes wrong? Sorry, but these two lines of Code don't give
>> many hints as to what the actual problem is.
As William said, you should use an OutputStream for binary data, since
this is what writes raw bytes.
Other then that, have you tried breaking down the problem into smaller
units? Can you write that binary data into some file? If that works,
look at what is different for your Problem then that, and so on.
See you
Stefan