code: public void close() throws IOException {
                  if (channel != null && channel.isOpen()) {
                          channel.close();
                  }
                  channel = null;
                  header = null;
          }
docs: Clean up any resources. Closes the channel.
  
  @throws java.io.IOException
  If errors occur while closing the channel.