The method is:

public static byte[] getStreamBytes(PRStream stream, RandomAccessFileOrArray
file)

After using it call file.close().

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Kevin Day [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, November 12, 2003 22:32
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] Potential resource leak in
> com.lowagie.text.pdf.PdfReader.getStreamBytes()
> 
> Just checking to make sure I'm not off base on this:
> 
> When I call the getStreamBytes() method, a file gets opened:
> 
> file.seek(stream.getOffset());
> 
> file.readFully(b);
> 
> 
> 
> But it doesn't look like it ever gets closed.  This (I think) causes a
> resource leak.  Unless there is some way that I should be closing the file
> after calling getStreamBytes()?
> 
> 
> 
> Thanks much!
> 
> - Kevin
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to