title: Encoding String to "modified UTF-8" for the DataInput
body: <p>I would like to encode String value to the modified UTF-8 format bytes. Something like</p>
  
  <pre><code>byte[] bytes = MagicEncoder.encode(str, "modified UTF-8");
  DataInput input = new DataInputStream(new ByteArrayInputStream(bytes));
  </code></pre>
  
  <p>Each read*() method of the DataInput has to be able to properly read the underlaying bytes.</p>