Use replace vector<uint8> with scoped_array in ByteBuffer