code: public void write(OutputStream out)
           throws IOException
      {
          Writer writer = new OutputStreamWriter(out);
          write(writer);
          writer.flush();
      }
docs: Write Element to an OutputStream.
  Calls print(Writer) and checks errors
  Elements that override this method should also override
  write(Writer) to avoid infinite recursion.
  @param out OutputStream to write the element to.