[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn-javahl: streamFileContent and large files

From: Patrick Mayweg <mayweg_at_qint.de>
Date: 2006-02-07 11:49:48 CET

Hi Manuel,
I do not understand what kind of buffering you want to do. Could you
explain that to me? If you do not want to use too much memory, a
FileOutputStream would write the file content directly to the disk.
Regards,
Patrick

Manuel Freiholz wrote:
> Hi,
> i just subscribed to this mailing list and i hope i write to the
> correct adress.
> I just started development with svn so be indulgent with me :P
>
> I'm not sure, but i think i found a bug in the new method of the
> svn-javahl-1.3 -> "streamFileContent(..)". I looked in the native code
> and found this ( File: SVNClient.cpp, Line 2405, Method:
> streamFileContent ):
>
> ----
> while (contentSize > 0)
> {
> size_t readSize = bufSize > contentSize ? contentSize : bufSize;
> Err = svn_stream_read(read_stream, (char *)bufData, &readSize);
> if (Err != NULL)
> {
> env->ReleaseByteArrayElements(buffer, bufData, 0);
> svn_stream_close(read_stream);
> JNIUtil::handleSVNError(Err);
> return;
> }
>
> env->ReleaseByteArrayElements(buffer, bufData, JNI_COMMIT);
> env->CallVoidMethod(outputStream, writeMethod, buffer, 0,
> readSize);
> if (JNIUtil::isJavaExceptionThrown())
> {
> env->ReleaseByteArrayElements(buffer, bufData, 0);
> svn_stream_close(read_stream);
> return;
> }
> contentSize -= readSize;
> }
> ----
>
> The code is reading from the "read_stream" and fills the OutputStream
> completly. -> No Buffering possible in my java.
>
> So i have the problem in my code that i can not download large files
> like 80 MB and bigger directly via "streamFileContent" from subversion.
>
> Is there anybody with the same problem who knows a solutions?
>
> Greetings,
> - Manuel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 7 11:50:55 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.