close method

void close()

Clean up any resources. Closes the channel.

@ If errors occur while closing the channel.

Implementation

void close() {
  // don't throw NPE on double close
  // if (channel == null) return;
  try {
    if (channel.isOpen) {
      channel.close();
    }
  } finally {
    if (shxReader != null) shxReader!.close();
  }
  shxReader = null;
  // channel = null;
  // header = null;
}