added support for java.nio.ByteBuffer