This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where is gnu.gcj.convert.Output_UTF8?


Clemens Eisserer wrote:
However I still have a problem: Till such a http-connection is etablished and the input-stream is opened it takes about 5 secs whereas even old 1.1-style jvm work well with my code.
Are there any special things I have to do to make connecting faster?

If you're using the inetlib HTTP stream handler, be advised that it buffers the entity in the HTTP response entirely in memory before making it available to you as an input stream. Thereafter, there will be no network latency on reads from the input stream.


This is because the chunked transfer-coding introduced in HTTP/1.1 permits response headers after the entity; however, most users of the URLConnection class will assume that all response headers are present as soon as the connect method has completed, as specified in the documentation.

Where performance is important, or you are dealing with very large entities that will not fit in available memory, you will probably want to use the underlying HTTPConnection class and provide your own callbacks to optimise network behaviour under various circumstances.
--
Chris Burdess



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]