code: protected void validate() throws IOException {
          if (null != this.error) {
              throw this.error;
          }
          if (isClosed()) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "validate - is closed: hc: " + this.hashCode() + " details: " + this);
              }
  
              throw new IOException("Stream is closed");
          }
          if (null == this.output) {
              setBufferSize(32768);
          }
      }
docs: Perform validation of the stream before processing external requests
  to write data.
  
  @throws IOException