code: @Override
      public void close() {
          if (!closed.compareAndSet(false, true))
              return;
  
          //is synchronized with itself and _next calls,
          //so no synchronization on inner reader is needed
          try {
              synchronized (inputStream) {
                  inputStream.close();
              }
          } catch (IOException ex) {
              throw new RuntimeException(ex);
          }
      }
docs: Closes the output port