title: Persist/Restore Scala Instance (to/from File)
body: <h2>What is the simplest way to save/restore an instance in Scala to/from a File?</h2>
  
  <p>Now that scala.util.Marshal has been removed and the innovative Pickling library appears unsupported (requires the use of Scala 2.10.4).</p>
  
  <p>Example:</p>
  
  <pre><code>val myObj = SortedSet(20, 10, 30)
  SomeUtil.saveToFile(myObj)
  
  //...later:
  val restored: SortedSet[Int] = SomeUtil.restoreFromFile(filename)
  </code></pre>