• 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: How to download a file from a web site?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to download a file from a web site?


  • Subject: Re: How to download a file from a web site?
  • From: David Blanton <email@hidden>
  • Date: Tue, 01 Apr 2003 10:34:15 -0700

On 4/1/03 3:15 AM, "Lorenzo Puleo" <email@hidden> wrote:

> How to download a file SIT from a web site using Cocoa?
> Also it should be fine to show a progress bar reporting the status of
> downloading and a Cancel button.
> Is there any sample code somewhere?
>
> Best Regards

NSURL * aURL = [[NSURL alloc]initWithString:@"http://name.net/file.sit";];
NSData *theData = [NSData dataWithContentsOfURL:aURL];
unsigned int theDataLength = [theData length];

if(theDataLength)
{
unsigned char userBuffer[theDataLength];
[theData getBytes:userBuffer];

}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >How to download a file from a web site? (From: Lorenzo Puleo <email@hidden>)

  • Prev by Date: Re: "Standard" strings available anywhere?
  • Next by Date: Re: Javadoc for obj-c??
  • Previous by thread: Re: How to download a file from a web site?
  • Next by thread: Re: How to download a file from a web site?
  • Index(es):
    • Date
    • Thread