Dump the next reading from the stream.

        Returns:
            IOTileReading: The next reading or None if there isn't one
558195
def dump_next(self):
        

        if self.dump_walker is None:
            return pack_error(ControllerSubsystem.SENSOR_LOG, SensorLogError.STREAM_WALKER_NOT_INITIALIZED)

        try:
            return self.dump_walker.pop()
        except StreamEmptyError:
            return None
583321
public boolean next() throws IOException {
		boolean hasNext = true;
		try {
			oldId = stream.readInt();
			oldText = stream.readUTFAsArray();
		} catch (EOFException e) {
			hasNext = false;
		}
		return hasNext;
	}
1065259
def read(self):
        
        if self._output_buffer:
            b, self._output_buffer = (self._output_buffer[0:1],
                                      self._output_buffer[1:])
            return b

        return b''
757019
def read(self):
        ""
        if self.verbose > 1:
            sys.stderr.write("poll: reading from daemon...\n")
        eol = self.linebuffer.find('\n')
        if eol == -1:
            frag = self.sock.recv(4096)
            self.linebuffer += frag
            if self.verbose > 1:
                sys.stderr.write("poll: read complete.\n")
            if not self.linebuffer:
                if self.verbose > 1:
                    sys.stderr.write("poll: returning -1.\n")
                # Read failed
                return -1
            eol = self.linebuffer.find('\n')
            if eol == -1:
                if self.verbose > 1:
                    sys.stderr.write("poll: returning 0.\n")
                # Read succeeded, but only got a fragment
                return 0
        else:
            if self.verbose > 1:
                sys.stderr.write("poll: fetching from buffer.\n")

        # We got a line
        eol += 1
        self.response = self.linebuffer[:eol]
        self.linebuffer = self.linebuffer[eol:]

        # Can happen if daemon terminates while we're reading.
        if not self.response:
            return -1
        if self.verbose:
            sys.stderr.write("poll: data is %s\n" % repr(self.response))
        self.received = time.time()
        # We got a \n-terminated line
        return len(self.response)
532405
def read(self):
        
        __result = []

        __ll = self.readline()
        while __ll:
            __result.append(__ll)
            __ll = self.readline()

        return list(__result)
1011168
def dump_stream(self, iterator, stream):
        

        def init_stream_yield_batches():
            should_write_start_length = True
            for series in iterator:
                batch = self._create_batch(series)
                if should_write_start_length:
                    write_int(SpecialLengths.START_ARROW_STREAM, stream)
                    should_write_start_length = False
                yield batch

        return ArrowStreamSerializer.dump_stream(self, init_stream_yield_batches(), stream)
675248
def stream(self):
        
        st = self._stream()
        for l in next(st):
            yield l.rstrip("\n")
1310099
async def read(self, n=None):
        
        if self._streamed:
            return b''
        buffer = []
        async for body in self:
            buffer.append(body)
        return b''.join(buffer)
1225566
private InputStream nextEntryStream() throws IOException {
    long nextLedgerEntryId = currentStreamState.getNextLedgerEntryId();
    if (nextLedgerEntryId > maxLedgerEntryIdSeen) {
      updateMaxLedgerEntryIdSeen();
      if (nextLedgerEntryId > maxLedgerEntryIdSeen) {
        // Return null if we've reached the end of the ledger: we can not
        // read beyond the end of the ledger and it is up to the caller to
        // either find the new "tail" of the ledger (if the ledger is in-
        // progress) or open the next ledger (if the ledger is finalized)
        if (LOG.isDebugEnabled()) {
          LOG.debug("Requesting to ledger entryId " + nextLedgerEntryId +
              ", but "+ " maxLedgerEntryIdSeen is " + maxLedgerEntryIdSeen +
              ", ledger length is " + ledger.getLength());
        }
        return null;
      }
    }
    try {
      Enumeration<LedgerEntry> entries =
          ledger.readEntries(nextLedgerEntryId, nextLedgerEntryId);
      currentStreamState.incrementNextLedgerEntryId();
      if (entries.hasMoreElements()) {
        LedgerEntry entry = entries.nextElement();
        if (entries.hasMoreElements()) {
          throw new IllegalStateException("More than one entry retrieved!");
        }
        currentStreamState.setOffsetInEntry(0);
        return entry.getEntryInputStream();
      }
    } catch (BKException e) {
      throw new IOException("Unrecoverable BookKeeper error reading entry " +
          nextLedgerEntryId, e);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new IOException("Interrupted reading BookKeeper entry " +
          nextLedgerEntryId, e);
    }
    return null;
  }
1225015
function readNext() {
    let stream, state;

    while (!isDone) {
      if (!state1.ended
          && (state2.ended || state1.totalDataLen <= state2.totalDataLen)) {
        stream = stream1;
        state = state1;
      } else if (!state2.ended) {
        stream = stream2;
        state = state2;
      } else {
        debug('All streams have ended.  No further reads.');
        return;
      }

      const data = stream.read();
      if (data === null) {
        debug(`Waiting for ${streamName(stream)} to be readable...`);
        stream.once('readable', readNext);
        return;
      }

      handleData.call(stream, state, data);
    }
  }
1177520
def read(self, b=None):
        
        data = self.__wrapped__.read(b)
        self.__tee.write(data)
        return data
979559
def readOne(stream, validate=False, transform=True, ignoreUnreadable=False,
            allowQP=False):
    
    return next(readComponents(stream, validate, transform, ignoreUnreadable,
                               allowQP))
1353775
def readonce(self, size = None):
        
        if self.eof:
            raise EOFError
        if self.errored:
            raise IOError('Stream is broken before EOF')
        if size is not None and size < len(self.data) - self.pos:
            ret = self.data[self.pos: self.pos + size]
            self.pos += size
            return ret
        else:
            ret = self.data[self.pos:]
            self.pos = len(self.data)
            if self.dataeof:
                self.eof = True
            return ret
294326
def read_nowait(self):
        
        result = self._queue.get_nowait()

        self._can_write.set()

        if self._queue.empty():
            self._can_read.clear()

        return result
555529
def get_next_batch(self):
        
        messages = self.get_from_kafka()
        if messages:
            for message in messages:
                item = BaseRecord(message)
                self.increase_read()
                yield item

        self.logger.debug('Done reading batch')
        self.last_position = self.consumer.offsets
740392
def next(self):
        

        if self._stopped_iteration:
            raise StopIteration()

        # we do this because if get blocks, we can't catch a KeyboardInterrupt
        # so the slight timeout allows for that.
        while True:
            try:
                chunk = self.process._pipe_queue.get(True, 0.001)
            except Empty:
                if self.call_args["iter_noblock"]:
                    return errno.EWOULDBLOCK
            else:
                if chunk is None:
                    self.wait()
                    self._stopped_iteration = True
                    raise StopIteration()
                try:
                    return chunk.decode(self.call_args["encoding"],
                        self.call_args["decode_errors"])
                except UnicodeDecodeError:
                    return chunk
1298130
def readlines(self):
        
        continuation = False
        while True:
            yield self.readline(continuation)
            continuation = True