Instead of using the available method try using some other function to read
bytes and then check it.
Ashwani
> ----------
> From: Paul Beer
> Reply To: [EMAIL PROTECTED]
> Sent: Saturday, February 26, 2000 1:08 AM
> To: [EMAIL PROTECTED]
> Subject: outputting a fileinputstream
>
> I am trying to load an xml packet off a local directory and display it in
> a
> jsp template... to no avail... could someone lok at this code and let me
> know why it displays nothing ? when i do a string.length() i get 3451 so
> I
> know it is reading the stream... I just cant output it in JSP.
>
> thanks,
> paul
>
> code:
>
> File file = new File("./public_html/xml/cc.xml");
> FileInputStream fis = new FileInputStream(file);
> byte[] data = new byte[fis.available()];
> String strData = new String(data);
> out.println(strData);
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html