support Buffer<->byte[] marshaling