code: public final void toHandler(final Handler<? super T> handler) {
          Preconditions.checkNotNull(handler);
          synchronized (this.state) {
              checkState();
              this.state.available = false;
              this.state.toHandlerThread = Thread.currentThread();
          }
          try {
              try {
                  doToHandler(handler);
              } catch (final Throwable ex) {
                  Throwables.propagate(ex);
              }
          } finally {
              synchronized (this.state) {
                  if (this.state.closed) {
                      checkState(); // fail in case stream was closed while iteration was active
                  }
                  this.state.toHandlerThread = null; // to avoid interruption
                  Thread.interrupted(); // clear interruption status
                  close(); // if not closed, will close the stream now
              }
          }
      }
docs: Terminal operations that forwards all the elements of this Stream to the Handler specified.
  No explicit mechanism is provided for interrupting the Iteration, although many Streams may
  react to the standard {@link Thread#interrupt()} signal to stop iteration.
  
  @param handler
  the Handler where to forward elements