Hello,
i using the HttpClient in a Java Applet but
if i transfer a file larger then 32MB i get a OutOfMemory.
does some others has the same bug?
greetz from Germany
Martin
Martin,
please have a look at this example:
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/ChunkEncodedPost.java?rev=1.4.2.1only_with_tag=HTTPCLIENT_2_0_BRANCHview=auto
(link may be wrapped)
Kind regards
Ortwin Glück
martin hilpert wrote:
Hello,
i using the
Hallo Ortwin so schnell findet man sich wieder,
du hast in der einen Java NG geantwortet
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/Ch
unkEncodedPost.java?rev=1.4.2.1only_with_tag=HTTPCLIENT_2_0_BRANCHview=aut
o
gruß martin
:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 11:09
To: [EMAIL PROTECTED]
Subject: OutOfMemory if using PUT
Hello,
i using the HttpClient in a Java Applet but
if i transfer a file larger then 32MB i get a OutOfMemory.
does some others has the same bug?
greetz from Germany
Martin
Hello Oleg,
The problem is most likely caused by the PUT method buffering the request
body in order to determine its length
that means there is no work around WITH PUT ?
You can avoid this problem by
(1) using chunk-encoding
martin hilpert wrote:
that means there is no work around WITH PUT ?
The two alternatives ARE the work around!
that are both POST requests?
The same applies to PUT methods as well as PUT basically works the same
as POST.
-
To
ok first thank it work now with files larger 32mb,
but there is still a another problem.
if the user transfer a large file like 32MB over a normal DSL connection
(128kbit up / 796 kbit down)
how could i find out how many bytes are send?
is there anyway?
martin
Hi Ortwin,
Not from within HttpClient directly. You can however simply wrap your
stream and count the bytes read through the respective methods.
how can i wrap it?
any sampel code?
thx
martin
-
To unsubscribe, e-mail:
martin hilpert wrote:
Hi Ortwin,
Not from within HttpClient directly. You can however simply wrap your
stream and count the bytes read through the respective methods.
how can i wrap it?
any sampel code?
Errm... Ever heard of the java.io.FilterInputStream class? It is
intended to be a base
Hi,
yes i heard about that class.
no i dont use any swing control,
i use awt.
Errm... Ever heard of the java.io.FilterInputStream class? It is
intended to be a base class for such a thing linke you need. If you are
using Swing you can just use javax.swing.ProgressMonitorInputStream.
i dont
martin hilpert wrote:
i dont understand how i can monitor the stream.
HttpClient client = new HttpClient();
PutMethod put = new PutMethod(zielurl);
FileInputStream fin =new FileInputStream(C:\test.jpg);
MonitorInputStream min = new MonitorInputStream(fin);
put.setRequestBody(fin);
11 matches
Mail list logo