Michael> When using the following I need to catch IllegalAccessException:
Michael> return (representationClass.newInstance() instanceof ByteBuffer);
Sorry, I didn't read closely enough. instanceof won't work.
But how about
java.nio.ByteBuffer.class.isAssignableFrom(representationClass)
I think that's more idiomatic than using Class.forName.
Tom