To obtain high remnant polarization and good crystalinity of ferroelectric thin films in non-volatile memory devices, the high temperature treatment in oxygen ambient is inevitable. Severe problems that occur in this process are oxygen diffusion into substrate, oxidation of electrode and buffer layer, degradation of microstructure and so on. We made ruthenium dioxide thin film by reactive sputtering with oxygen and argon mixture atmosphere. Comparing quantitatively the core-level spectra of Ru and RuO$_2$ obtained by x-ray photoelectron spectroscopy(XPS), we found that chemical state of RuO$_2$ is very stable and of good resistance to oxygen diffusion and oxidation of adjacent layers. It opens the use of RuO$_2$ thin film as a multifunctional layer of good conducting electrode and resistive barrier for the diffusion and the oxidation. We also suggest a correct understanding of Ru 3d core-level spectrum for RuO$_2$ based on the scheme of final state screening and charge transfer satellites.