code: public void close()
          throws IOException
      {
          if (server != null) {
              OutputStream os = getOutputStream();
              this.os = null;
  
              MuxServer server = this.server;
              this.server = null;
  
              server.close(channel);
          }
      }
docs: Complete writing to the stream, closing the channel.