Hi Rainer,
Thank you for your time and consideration and now i am sending my ReadTile.java and
geeting
exception to U ..Please send me the answer ....
*
* @author Rainer Klute ([EMAIL PROTECTED])
* @version $Id: ReadTitle.java,v 1.2 2003/02/20 17:51:37 klute Exp $
* @since 2003-02-01
*/
public class ReadTitle
{
public static void main(String[] args) throws IOException
{
final String filename = args[0];
POIFSReader r = new POIFSReader();
r.registerListener(new MyPOIFSReaderListener(),"\005SummaryInformation");
r.read(new FileInputStream(filename)); ==== Here is the Line No :24--I am
geeting here
Error.......
}
static class MyPOIFSReaderListener implements POIFSReaderListener
{
public void processPOIFSReaderEvent(POIFSReaderEvent event)
{
SummaryInformation dsi = null;
try
{
dsi = (SummaryInformation)PropertySetFactory.create(event.getStream());
}
catch (Exception ex)
{
throw new RuntimeException ("Property set stream \"" +event.getPath()
+
event.getName() + "\": " + ex);
}
final String title = dsi.getTitle();
if (title != null)
System.out.println("Title: \"" + title + "\"");
else
System.out.println("Document has no title.");
}
}
}
and here is the Error i am getting on my console .....
Exception in thread "main" java.lang.RuntimeException: Property set stream "\005;Su
mmaryInformation": java.io.UnsupportedEncodingException: cp1252
at ReadTitle$MyPOIFSReaderListener.processPOIFSReaderEvent(ReadTitle.jav
a:39)
at org.apache.poi.poifs.eventfilesystem.POIFSReader.processProperties(PO
IFSReader.java:260)
at org.apache.poi.poifs.eventfilesystem.POIFSReader.read(POIFSReader.jav
a:96)
at ReadTitle.main(ReadTitle.java:24)=======
Please Tell me the Error where i am getting now....
I am waiting for your replay....
Thank you for replay...
Srinivas
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.