docs: public void write(int c) throws IOException {
          // defect 312981 begin
          //ensureOpen();
      	if (closed) {
      	    throw new IOException("Stream closed");
          }
          // defect 312981 end
          if (bufferSize == 0) {
              initOut();
              out.write(c);
          }
          else {
              if (nextChar >= bufferSize)
                  if (autoFlush)
                      flushBuffer();
                  else
                      bufferOverflow();
              cb[nextChar++] = (char) c;
          }
      }