code: public final void serialize(OutputStream out) throws IOException {
          out.write(Jackson.toJsonString(this).getBytes(UTF8));
          out.flush();
      }
docs: Writes the serialized representation of the paused transfer state to the
  given <code>OutputStream</code>. Caller of this method should explicitly
  close the <code>OutputStream</code>.