Of Streams, Readers and Writers

When Java switched it's reliance from InputStream and OutputStream to Reader and Writer (at least, for text streams), Sun didn't provide any way to create an InputStream from a Reader (despite the StringBufferInputStream javadocs saying, "As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class"). This is especially noticed as the StringBufferInputStream was deprecated and Properties is dependendent on InputStream, not Reader.

Here's to the rescue.

What is my appserver doing with all of the CPU time?

I ran into an issue with a servlet application (running under WebLogic Server), was consuming an inordinate amount of CPU time. Profiling the application did not turn up any indication of why, presumably because the CPU was being used by a thread other than the one being profiled. Consulting with Bea led me to capturing information pinpointing which thread was consuming the time.

See JavaTidbits/ThreadDump for the details.

Browsers and Applets

<sigh> This always seems to be a problem. Right now, I'm chasing an issue in which Javascript needs to invoke a function in an Applet. (It's not that I want to do this, but it's the only way to implement the desired functionality in the browser.) It works fine under Firefox. Under IE (at least, this particular version of IE6), you can allow the jscript to access the java, and it seems to work if the jvm is version 1.5, but throws a null pointer exception if the jvm is version 1.4. </sigh>

I found this page that tells you the version of java that your browser is running. This page tells you if java is enabled and runnable from javascript. And here is a Microsoft knowledge base article on java problems in IE.

iDIAcomputing: JavaTidbits (last edited 2009-07-27 18:25:23 by localhost)