Kevin,
Thank you so much for your posts!!!!!!!!!!!!!!
My problem was my loop in the copy function! I can't beleive I didn't see it.
I had the return in the 'if else' block!
It works great now!
Thanks again, you totally made my day!
kc
****snip****
> Again, it appears to work for me - thought it may have to do w/ EOF
> characters or some such, but it appears to handle that correctly.
>
> The size of 1-5K sounds like it could be related to the "copy" function
> (which attempts to copy using an 8K buffer) - is the loop correct?
>
> Did my message come through with correct indentation? I'm seeing it as
> completely outdented, both in the email digest I received and in the
> jython-users archive. :-(
>
> Here it is with Python's optional brace delimiters. ;-)
>
> BUFSIZE=8192
> def copy( input, output, bufsize=BUFSIZE ):
> #{
> buffer = jarray.zeros( bufsize, 'b' )
> total = 0
> while 1:
> #{
> bytesRead = input.read( buffer, 0, bufsize )
> if bytesRead == -1:
> #{
> break
> #}
> else:
> #{
> output.write( buffer, 0, bytesRead )
> total = total + bytesRead
> #}
> #}
> return total
> #}
>
> kb
>
> PS. You may also need to add some directory handling, if the zip file
> doesn't have entries for each directory for which it has files:
>
> if file.getParentFile():
> file.getParentFile().mkdirs()
>
>