Yes, but this level of confusion (by veteran programmers) may show that the ByteBuffer low-level IO class may not be an ideal general-purpose data field for user-level generated Java structs. Getting data out of the ByteBuffer seems a bit confusing and error prone.
I.e. if it were totally up to me, I probably wouldn't expose this in the default generated Java code for structs produced from an IDL. I'd either make it an advanced compiler option, or only use it deep in the hidden engine guts, masked behind getters and setters that return simpler idempotent data types.
On 8/31/10 11:26 PM, Mathias Herberts (JIRA) wrote:
TBaseHelper could be modified to expose a clean way of retrieving a byte[] version of the ByteBuffer's content, this would ease migration to ByteBuffers.
