Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] remote calls Image class

Tobias Seckinger

2007-08-07


Hello,

I have used the Image class to get an Image from a remote location.
Therefore I used the methode "getInstance(URL url)". But the performance was
not so good, because because of this (I think):

is = url.openStream();
int c1 = is.read();
int c2 = is.read();
int c3 = is.read();
int c4 = is.read();
is.close();

Why do you use four remote calls instead of one?

byte [] c = new byte [4];
int rcount = is. read (c, 0, 4);
// Access with c[0] , c[1] , c[2] , c [3]

Best regards,

Tobias Seckinger
Germany


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
©2008 junlu.com - Jax Systems, LLC, U.S.A.