TEZ-1390. Replace byte[] with ByteBuffer as the type of user payload in
the API. Contributed by Tsuyoshi OZAWA.