Krishna Rambathri
Krishna Rambathri

Reputation: 129

convert ByteArray to NSData

I want convert ByteArray into NSData How can i do? please Help me

Upvotes: 2

Views: 2939

Answers (1)

Ecco
Ecco

Reputation: 1393

I assume what you're calling a ByteArray is actually a "char *", or more generally a pointer to some data.

Then you'll want to do [NSData dataWithBytes:pointer]. Read http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/BinaryData/Tasks/WorkingBinaryData.html

Upvotes: 1

Related Questions