Re: AW: struts and iText

2004-08-04 Thread Craig McClanahan
FileInputStream.available() is only guaranteed to tell you how many bytes are immediately available for reading without blocking -- probably one buffer worth. You need to copy *all* of the bytes to the output stream -- something like this (but doing it from memory so might not be correct): Fi

AW: struts and iText

2004-08-04 Thread Otto, Frank
Hi, I have written an action class to show the pdf, but the pdf is corrupt. Do I something wrong? ... FileInputStream fis = new FileInputStream(pdf_path); int anz = fis.available(); byte[] data = new byte[anz]; fis.read(data); ByteArrayOutputStream baos = new ByteArrayOutputStre

AW: struts and iText

2004-08-03 Thread Otto, Frank
Thanks for your answer. I will cache the pdf for later evaluation. The webserver has access to this pdf (saved on hard disk). I want to open the pdf in the browser and show the jsp page at the same time. How must I write the action class? > -Ursprüngliche Nachricht- > Von: Jesse Alexan