Possible Duplicate:
Byte array in objective-c
Am converting some Java code to Objective-C and have run into an issue that I can’t get my head around:
public static final byte[] DATA_GENERIC = new byte[] { (byte)0xA0, 0x00, 0x00, 0x00, 0x03,
0x10, 0x10 };
Does anyone know to convert the above into Objective-C
Here is an example of getting your data into a
NSDataobject.Output:
<a0000000 031010>One major difference from java is you will need to keep track of the number of bytes yourself when working with a raw char array. Once you create the
NSDatayou can access the length.