Is there a Java equivalent of Python's printf hash replacement?
<p>Specifically I am converting a python script into a java helper method. Here is a snippet (slightly modified for simplicity).</p>

<pre><code># hash of values
vals = {}
vals['a'] = 'a'
vals['b'] = 'b'
vals['1'] = 1

output = sys.stdout
file = open(filename).read()

print &gt;&gt;output, file % vals,
</code></pre>

<p>So in the file there are %(a), %(b), %(1) etc that I want substituted with the hash keys. I perused the API but couldn't find anything. Did I miss it or does something like this not exist in the Java API?</p>
