• 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: StringBuffer to NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: StringBuffer to NSData


  • Subject: Re: StringBuffer to NSData
  • From: Nathan Dumar <email@hidden>
  • Date: Fri, 10 Sep 2004 13:00:53 -0400

Andy and Colin,

I knew something was wrong when two people were telling me to do something that I *thought* I had tried and failed to do. When I went back and looked again, I was doing:

page.takeValueForKey(sb.toString().getBytes(), "dataForFile"); // dataForFile is an NSData

instead of

page.takeValueForKey(new NSData(sb.toString().getBytes()), "dataForFile");

I knew better ... guess it's just a newbie blunder. Thank you both for setting me straight.

Take care,
Nathan


On Sep 10, 2004, at 11:07 AM, Andy Beier wrote:

I believe it should go like this:

StringBuffer sb = new StringBuffer();
new NSData(sb.toString().getBytes());

Andy

and

On Sep 10, 2004, at 11:04 AM, Colin Clark wrote:

NSData myData = new NSData(myStringBuffer.toString().getBytes());

I hope that helps,

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


References: 
 >RE: StringBuffer to NSData (From: Andy Beier <email@hidden>)

  • Prev by Date: OOPSLA
  • Next by Date: log4j questions
  • Previous by thread: RE: StringBuffer to NSData
  • Next by thread: Re: Table Column Limit for WOReps?
  • Index(es):
    • Date
    • Thread