Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Problem on getting data from internet

  Asked By: Wayne    Date: Jan 15    Category: Java    Views: 1516

I am making a program for downloading file from internet (http).
I am using InputStream for reading data, but I have problem when the size of
the file big enough, for example 300 Kb. It's okay if the size just around
50 Kb or below. But, in other case I test my program in my own computer
too, I have PWS and Apache server in Win-98. And my program could download
all data without "corruption", even for file with the size of 10 Mb.
I don't know where's the problem, the server ?? or in my program ?? Or it's
the mechanism from server to cut off the connection that take a lot of
bandwidth ?



3 Answers Found

Answer #1    Answered By: Jamie Williams     Answered On: Jan 15

write the version of Apache
the InputStream could not work for bigger file
you have to use the function File/ FileWriter

Answer #2    Answered By: Darrell Harvey     Answered On: Jan 15

Well finally, after about three days, my e-mail come to this group safely :)
But, it's okay...I already got the solution

Answer #3    Answered By: Bethany Hughes     Answered On: Jan 15

Thanks for suggestion, but I just tried my program  using Apache Server 1.3.9
for Windows and my program could transfer file  about 10 MB by using
InputStream without problem, hmm...don't worry I will consider File or
FileWriter as you said :) I will read about them tomorrow (it's 00.30 AM
here). Honestly, I am using InputStream inspired by previous e-mail about
getting file size  from internet, so I just want to try the code and add
something useful there.

Didn't find what you were looking for? Find more on Problem on getting data from internet Or get search suggestion and latest updates.