handle ByteBuffers and Uint8Lists