A ClassCastException will only be thrown if you downcast an object to the wrong type (e.g. You have a String which is currently stored as type Object ... and you downcast it to an Integer by mistake.) ... I always downcast within a try/catch block and catch the exception .. just in case! Almost always you will be sure what the actual type of the object is so the exception is very rarely thrown!
ms, Please change your name to be compliant with JavaRanch's naming policy. Your ID should be 2 separate names with more than 1 letter each. We really want this to be a professional forum and would prefer that you use your REAL name. Thanks, Cindy
"JavaRanch, where the deer and the Certified play" - David O'Meara
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com