tending the base class. Let&rsquo;s consider the following example in which we want to store and retrieve a <code>Person</code>.</p>
<pre class="prettyprint"><code class="language-scala">case class Person(name: String, age: Int)
</code></pre>
<p>Let&rsquo;s define a <code>Writer</code> and <code>Reader</code> class capable of serializing and deserializing a <code>Person</code>. To make it even more fun, let&rsquo;s say we want to encode the <code>String</code> values in UTF-16 instead of default UTF-8.</p>
