• 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: dataUsingEncoding: vs. archivedDataWithRootObject:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dataUsingEncoding: vs. archivedDataWithRootObject:


  • Subject: Re: dataUsingEncoding: vs. archivedDataWithRootObject:
  • From: "James Chen a.k.a. 陳銘崧" <email@hidden>
  • Date: Tue, 15 Mar 2005 18:08:59 +0800

DataUsingEncoding convert a NSString to specified encoding such as
NSASCIIStringEncoding.

[NSKeyedArchiver archivedDataWithRootObject] is doing serialization with the
root object which conforms to NSCoding protocol. The returned NSData
contains the encoded form of the object graph specified by the root object.
And you could use NSKeyedUnarchiver to decoded the data back to the object
graph.

In general, NSKeyedArchiver is used to produce the persistence, such as your
document file.

HTH,
James
On 3/15/05 1:20 PM, "Eric Lin" <email@hidden> wrote:

> What is the difference between calling [aString
> dataUsingEncoding:....] vs. [NSKeyedArchiver
> archivedDataWithRootObject:aString]?
>
> Thanks,
> Eric
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: dataUsingEncoding: vs. archivedDataWithRootObject:
      • From: Eric Lin <email@hidden>
References: 
 >dataUsingEncoding: vs. archivedDataWithRootObject: (From: Eric Lin <email@hidden>)

  • Prev by Date: Re: How to create a window with a border
  • Next by Date: Re: multidimensional arrays
  • Previous by thread: Re: dataUsingEncoding: vs. archivedDataWithRootObject:
  • Next by thread: Re: dataUsingEncoding: vs. archivedDataWithRootObject:
  • Index(es):
    • Date
    • Thread