There are many different encodings possible. If you use the same encoding in both Objective-C and in Java, then you should get the same bytes (or string, if you're going the other way). I'd expect Java to use UTF8, which is specified in Cocoa as NSUTF8StringEncoding.
There are several methods in NSString for converting a string to a pile o' bytes. Three of them are: -cStringUsingEncoding:, -UTF8String, and -dataUsingEncoding:. The first returns a char * pointing to a null-terminated array of char. The second does pretty much the same thing as calling the first and specifying UTF8. The third returns a NSData*, and you can access the bytes directly using NSData's -bytes method.