close method

void close()

Closes the stream.

Implementation

void close() {
  if (_isClosed) {
    throw Exception("You cannot close a closed Stream");
  }
  listenable._notifyDone();
  listenable.clear();
  _isClosed = true;
}