code: public static void writeClassToStream(Class<?> cl, OutputStream out) throws IOException {
      InputStream in = getClassAsStream(cl);
      StreamUtil.writeStream(in, out);
      out.flush();
    }
docs: Writes a class' bytecode to an <code>OutputStream</code>.
  @param cl The <code>Class</code> to write.
  @param out The <code>OutputStream</code> to write to.
  @throws IOException If unable to write to <code>out</code>.