How can I send a char array over the Obj-C/Java bridge as a byte array?
How can I send a char array over the Obj-C/Java bridge as a byte array?
- Subject: How can I send a char array over the Obj-C/Java bridge as a byte array?
- From: Yojimbo <email@hidden>
- Date: Mon, 28 Jul 2003 14:50:33 -0700
Hi all,
We've got a situation where we have a non-nil terminated character
array and need to send it across the Obj-C/Java bridge to a Java method
requiring a byte array. Right now, to get around type conversions
etc., I'm currently having to write the data we receive to a file and
read it back in as an NSString so that I can pass it on to a Java
wrapper that accepts the String and gets the bytes from it using
getBytes(). This solution obviously is just a workaround and we can't
be 100% sure that we aren't losing data in the conversion to NSString
since the data has several nils in it and is not nil terminated.
My knowledge on the Java bridge is limited and I've found virtually no
documentation that helps me in this situation. I was wondering if
anyone on this list might happen to know how I can pass this data
across the Obj-C/Java bridge unaltered from an Obj-C method or could
point me in the right direction to look for solutions?
Any help would be greatly appreciated.
Thanks,
Jim
_______________________________________________
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.