code: @Override
      public final void close() {
          synchronized (this.state) {
              if (this.state.closed) {
                  return;
              }
              if (this.state.activeIterator instanceof Closeable) {
                  Util.closeQuietly(this.state.activeIterator);
              }
              if (this.state.toHandlerThread != null) {
                  this.state.toHandlerThread.interrupt();
              }
              for (final Object object : this.state.closeObjects) {
                  closeAction(object);
              }
              this.state.activeIterator = null;
              this.state.toHandlerThread = null;
              this.state.available = false;
              this.state.closed = true;
          }
      }
docs: Closes this {@code Stream} and releases any resource associated to it. The operation causes
  any {@code Stream} wrapping or wrapped by this {@code Stream} to be closed. If element
  iteration through a terminal operation is in progress, it is interrupted resulting in an
  exception being thrown. If this {@code Stream} has already been closed, then calling this
  method has no effect.