Am Mo, 2004-10-25 um 09.05 schrieb Srinivas:
> I am using the POI in my Application and my aim is to count the line in the word 
> document.In that purpose i wrote some code but i am getting the error like....
>  
> Exception in thread "main" org.apache.poi.hpsf.MarkUnsupportedException: java.io
> .FileInputStream
>         at org.apache.poi.hpsf.PropertySet.isPropertySetStream(PropertySet.java:
> 332)
>         at org.apache.poi.hpsf.PropertySet.<init>(PropertySet.java:244)
>         at org.apache.poi.hpsf.PropertySetFactory.create(PropertySetFactory.java
> :59)
>         at LineCount.main(LineCount.java:21)
> 
>  
> and the Code is .....
>  
>            InputStream ins=new FileInputStream(args[0]);
>             PropertySet ps=PropertySetFactory.create(ins);
>             DocumentSummaryInformation dsi=new DocumentSummaryInformation(ps);
>             System.out.println("No fo Lines in the Word Document  "+ args[0]+"  is " 
> +dsi.getLineCount());
>  
> I don't know where is the error in my code ....Please tell me...

You should RTFM (Read The Fine Manual) available under
<http://jakarta.apache.org/poi/hpsf/how-to.html> and study the examples
under src/examples/src/org/apache/poi/hpsf/examples, e.g.
ReadTitle.java. The first thing you will find out is that you cannot
create a PropertySet as you are trying to do it.

Best regards
Rainer Klute

                           Rainer Klute IT-Consulting GmbH
  Dipl.-Inform.
  Rainer Klute             E-Mail:  [EMAIL PROTECTED]
  K�rner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423

Inhibit software patents: http://www.nosoftwarepatents.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to