Reads data from the pipe.
160290
public void read()
  {
    StateInPipe stateOld;
    StateInPipe stateNew;
    
    do {
      stateOld = _stateInRef.get();
      stateNew = stateOld.toActive();
    } while (! _stateInRef.compareAndSet(stateOld, stateNew));
    
    while (stateNew.isActive()) {
      readPipe();
      
      wakeOut();
      
      do {
        stateOld = _stateInRef.get();
        stateNew = stateOld.toIdle();
      } while (! _stateInRef.compareAndSet(stateOld, stateNew));
    }
    
    if (_stateInRef.get().isClosed()) {
      StateOutPipe outStateOld = _stateOutRef.getAndSet(StateOutPipe.CLOSE);
      
      if (! outStateOld.isClosed()) {
        _outFlow.cancel();
      }
    }
  }
493153
def read(self):
        
        stack = [self[0].child]
        while stack:
            current = stack.pop()
            if current.right:
                stack.append(current.right)
            if current.left:
                stack.append(current.left)

        self[0].seek(0)
907242
def read_message_from_pipe(pipe_handle):
    
    data = yield From(read_message_bytes_from_pipe(pipe_handle))
    assert isinstance(data, bytes)
    raise Return(data.decode('utf-8', 'ignore'))
370270
def Read(self, length=None):
    """"""

    if self.progress_callback:
      self.progress_callback()

    available_to_read = max(0, (self.size or 0) - self.offset)
    if length is None:
      to_read = available_to_read
    else:
      to_read = min(length, available_to_read)

    with FileHandleManager(self.filename) as fd:
      offset = self.file_offset + self.offset
      pre_padding = offset % self.alignment

      # Due to alignment we read some more data than we need to.
      aligned_offset = offset - pre_padding

      fd.Seek(aligned_offset)

      data = fd.Read(to_read + pre_padding)
      self.offset += len(data) - pre_padding

      return data[pre_padding:]
571955
def _read_loop(self, data=''):
        
        while True:
            if not self.is_connected or self.is_connecting or self.io.closed():
                break

            try:
                yield self.io.read_bytes(
                    DEFAULT_READ_CHUNK_SIZE,
                    streaming_callback=self._ps.parse,
                    partial=True)
            except tornado.iostream.StreamClosedError as e:
                self._err = e
                if self._error_cb is not None and not self.is_reconnecting and not self.is_closed:
                    self._error_cb(e)
                break
975009
def pipe_data_received(self, fd, data):
        """"""
        if fd == 2:  # stderr fd number
            self._on_stderr(data)
        elif self._on_data:
            self._on_data(data)
        else:
            self._queued_data.append(data)
548997
def read (self, stream):
      """"""
      self._data = stream.read(self._size)

      if len(self._data) >= self._size:
          values = struct.unpack(self._swap + self._format, self._data)
      else:
          values = None, None, None, None

      self.ts_sec   = values[0]
      self.ts_usec  = values[1]
      self.incl_len = values[2]
      self.orig_len = values[3]
1244363
private void pumpInputData() throws IOException {
    for (Input input : inputs) {
      if (input.pump == null) {
        continue;
      }
      OutputStream os;
      if (input.pipeName.equals(STDIN_FILE_NAME)) {
        os = process.getOutputStream();
      } else {
        throw new IOException("Only stdin piping is supported so far.");
      }
      input.pump.pump(os);
    }
  }
535637
def reader(stream):
    """"""
    string = stream.read()
    decoder = json.JSONDecoder().raw_decode
    index = START.match(string, 0).end()

    while index < len(string):
        obj, end = decoder(string, index)
        item = Item()
        item.primitive = obj
        yield item
        index = END.match(string, end).end()
796857
def read(self):
		
		self.repr_.setvalue(ord(self.open_stream_in.read(1)))
		return self.value.getvalue()
222955
void readFrom(InputStream in) throws IOException {
		//TODO could optimize for aligned instances
		final int size = finish - start;
		final int length = (size + 7) >> 3;
		if (length == 0) return;
		int p = size & 7;
		final int q = finish - p;
		if (p != 0) performAdj(SET, q, (long) in.read(), p);
		p = q;
		while (p > start) {
			p -= 8;
			performAdj(SET, p, (long) in.read(), 8);
		}
	}
935567
def read(*args):
    """"""
    return io.open(os.path.join(HERE, *args), encoding="utf-8").read()
637231
def read(self, n):
        
        buf = self._read_buf
        pos = self._read_pos
        end = pos + n

        if end <= len(buf):
            # Fast path: the data to read is fully buffered.
            self._read_pos += n
            return self._update_pos(buf[pos:end])

        # Slow path: read from the stream until enough bytes are read,
        # or until an EOF occurs or until read() would block.
        wanted = max(self.buffer_size, n)
        while len(buf) < end:
            chunk = self.raw.read(wanted)
            if not chunk:
                break
            buf += chunk

        self._read_buf = buf[end:]  # Save the extra data in the buffer.
        self._read_pos = 0
        return self._update_pos(buf[pos:end])
178125
def _read(self, f):
        """"""
        
        try:
            self.header = ord(f.read(1))
        except TypeError:
            log.debug("buffer underflow at offset {0}".format(f.tell()))
            raise LengthError("insufficient data to parse")
        
        mbf = bool(self.header & 0x80)
        mef = bool(self.header & 0x40)
        cff = bool(self.header & 0x20)
        srf = bool(self.header & 0x10)
        ilf = bool(self.header & 0x08)
        tnf = self.header & 0x07

        try:
            type_length = ord(f.read(1))
            if srf: # short record
                data_length = ord(f.read(1))
            else: # 32-bit length
                data_length = struct.unpack('>L', f.read(4))[0]
            if ilf: # id length present
                name_length = ord(f.read(1))
            else:
                name_length = 0
        except (TypeError, struct.error):
            log.debug("buffer underflow at offset {0}".format(f.tell()))
            raise LengthError("insufficient data to parse")

        try:
            record_type = f.read(type_length)
            assert len(record_type) == type_length
            record_name = f.read(name_length)
            assert len(record_name) == name_length
            record_data = f.read(data_length)
            assert len(record_data) == data_length
        except AssertionError:
            log.debug("buffer underflow at offset {0}".format(f.tell()))
            raise LengthError("insufficient data to parse")

        if tnf in (0, 5, 6) and len(record_type) > 0:
            s = "ndef type name format {0} doesn't allow a type string"
            raise FormatError( s.format(tnf) )
        if tnf in (1, 2, 3, 4) and len(record_type) == 0:
            s = "ndef type name format {0} requires a type string"
            raise FormatError( s.format(tnf) )
        if tnf == 0 and len(record_data) > 0:
            s = "ndef type name format {0} doesn't allow a payload"
            raise FormatError( s.format(tnf) )
            
        self._message_begin, self._message_end = mbf, mef
        self._type = bytearray(type_name_prefix[tnf] + record_type)
        self._name = bytearray(record_name)
        self._data = bytearray(record_data)
        log.debug("parsed {0}".format(repr(self)))
198114
def read(self, _file):
        """"""
        with open(_file) as fh:
            data = fh.read()
            if self.verbose:
                sys.stdout.write("read %d bytes from %s\n"
                                 % (fh.tell(), _file))
        return data
936953
protected void read() throws IOException {
        buffer.rewind();
        buffer.limit(buffer.capacity());
        device.read(offset, buffer);
        this.dirty = false;
    }
989564
def read(stream):
        '''
        

        '''
        (must_close, stream) = _open_stream(stream, 'read')
        try:
            data = PlyData._parse_header(stream)
            for elt in data:
                elt._read(stream, data.text, data.byte_order)
        finally:
            if must_close:
                stream.close()

        return data