code: public void close() {
          synchronized (this) {
              if (! closing) {
                  closing = true;
                  try {
                      // Android-changed: Lazily initialized.
                      if (textOut != null) {
                          textOut.close();
                      }
                      out.close();
                  }
                  catch (IOException x) {
                      trouble = true;
                  }
                  textOut = null;
                  charOut = null;
                  out = null;
              }
          }
      }
docs: Closes the stream.  This is done by flushing the stream and then closing
  the underlying output stream.
  
  @see        java.io.OutputStream#close()