title: How to "cat" a file in JGit?
body: <p>A while back I was looking for an <a href="https://stackoverflow.com/questions/177469/embeddable-distributed-version-control-system-in-java">embeddable distributed version control system in Java</a>,
  and I think I have found it in <a href="http://www.eclipse.org/egit/" rel="noreferrer">JGit</a>, which is a pure Java implementation of git.
  However, there is not much in the way of sample code or tutorials.</p>
  
  <p>How can I use JGit to retrieve the HEAD version of a certain file (just like <code>svn cat</code> or <code>hg cat</code> whould do)? </p>
  
  <p>I suppose this involves some rev-tree-walking and am looking for a code sample.</p>