• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOResponse large http file download
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOResponse large http file download


  • Subject: Re: WOResponse large http file download
  • From: Alexander Spohr <email@hidden>
  • Date: Fri, 18 Jan 2013 11:09:43 +0100

I think you are wrapping around maxint.
Your example code is incomplete. It can not work...


Am 18.01.2013 um 09:58 schrieb niek <email@hidden>:

> Hi all,
>
> I'm experiencing a problem when trying to download files larger than 4GB over http but only a part is downloaded.
> When I try to download a 32GB file, only 3,98GB (3980070495 bytes) is downloaded. When I try to download a 7GB file, only 2,7GB is downloaded.
> I have retried it several times, and the result was always the same.
>
> Example code:
>
> public WOActionResults DownloadAction() {
>     WOResponse response = new WOResponse();
>     response("application/x-document", "content-type");
>
>     File file = new File("/test.zip");
>
>     response("attachment; filename=\"" + file.getName() + "\"", "content-disposition");
>     response(new FileInputStream(file), 4096, file.length());
>     return response;
> }
>
>
> I'm using WebObjects 5.4.3, so since 5.4 the content-length in WOResponse.setContentStream is of type long.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: [Announce] WOCommunity repository for CentOS/RedHat Linux
  • Next by Date: Re: My first Hell World App
  • Previous by thread: Re: Best Current Platform
  • Next by thread: Re: WOResponse large http file download
  • Index(es):
    • Date
    • Thread