code: public Document next() {
          if (!hasNext())
              throw new NoSuchElementException("No further documents");
          if (bufferError != null)
              throw bufferError;
          try {
              return documentsToReturn.take();
          } catch (InterruptedException ie) {
              throw new IOError(ie);
          }
      }
docs: Returns the next document from the list.