This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I need to return a file to the browser through a jsp. The file contains binary data, so I need to return bytes. Here's the catch: I'm writing the jsp to run under coldfusion mx. So, while I would normally call getOutputStream, I encounter a java.lang.IllegalStateException when calling getOutputStream. This means that getWriter has already been called. So, I'm stuck with a writer, trying to write bytes. The writer is happy to write the bytes (which return as integers), or I can convert them to char. This output is close to the original, but doesn't product the file I'm returning exactly. I blame this on the character encoding used by the Writer. Any suggestions on how to coerce the writer to write bytes without any encoding? Or other ideas? I'm stuck with the writer, as coldfusion seems to take care of that on its own. Thanks! Chris