Read a C{list} from the data stream.
496409
def readList(self):
        
        obj = []
        self.context.addObject(obj)
        l = self.stream.read_ulong()

        for i in xrange(l):
            obj.append(self.readElement())

        return obj
1030626
def internal_reader(self, input_stream):
        
        for input_line in input_stream:
            yield list(map(self.deserialize, input_line.split("\t")))
288991
public int read(char []cbuf, int off, int len)
    throws IOException
  {
    for (int i = 0; i < len; i++) {
      int ch = read();

      if (ch < 0)
        return len;

      cbuf[off + i] = (char) ch;
    }

    return len;
  }
713029
def read(self, frame, data):
        ""
        seq = []
        while data:
            elem, data = self.spec.read(frame, data)
            seq.append(elem)
        return seq, data
415590
def read_string(self):
        """"""
        length = self._stream.read_var_uint32()
        return self._stream.read_string(length)
221834
def _read_all_values(self):
        """"""

        pos = 8

        # cache variables to local ones and prevent attributes lookup
        # on every loop iteration
        used = self._used
        data = self._m
        unpack_from = struct.unpack_from

        while pos < used:
            encoded_len = _unpack_integer(data, pos)[0]
            # check we are not reading beyond bounds
            if encoded_len + pos > used:
                msg = 'Read beyond file size detected, %s is corrupted.'
                raise RuntimeError(msg % self._fname)
            pos += 4
            encoded = unpack_from(('%ss' % encoded_len).encode(), data, pos)[0]
            padded_len = encoded_len + (8 - (encoded_len + 4) % 8)
            pos += padded_len
            value = _unpack_double(data, pos)[0]
            yield encoded.decode('utf-8'), value, pos
            pos += 8
652486
def read(cls, f):
    """"""
    header = WETHeader.read(f)
    if header is None:
      # EOF
      return None
    content = f.read(header.length)

    # Consume empty separators
    f.readline()
    f.readline()

    return cls(header.url, content)
1063975
def read_map(fname):
    
    lst = []
    with open(fname, "r") as f:
        for line in f:
            lst.append(line)
    return lst
879811
@SuppressWarnings("unchecked")
    public <T> List<T> readListOf(Class<T> type) throws IOException
    {
        if (_parser.isExpectedStartArrayToken()) {
            return (List<T>) new CollectionReader(List.class, _readerLocator.findReader(type)).read(this, _parser);
        }
        if (_parser.hasToken(JsonToken.VALUE_NULL)) {
            return null;
        }
        throw JSONObjectException.from(_parser,
                "Can not read a List: expect to see START_ARRAY ('['), instead got: "+ValueReader._tokenDesc(_parser));
    }
755905
def read_plain_byte_array(file_obj, count):
    """"""
    return [file_obj.read(struct.unpack(b"<i", file_obj.read(4))[0]) for i in range(count)]
19840
public int read( char[] cbuf, int off, int len ) throws IOException
    {
        //check the buffer queue
        int size = queue.size();
        if ( size > 0 ) {
            //TODO
            //int num = size <= len ? size : len;
            //System.arraycopy(src, srcPos, dest, destPos, length)
            throw new IOException("Method not implemented yet");
        }
        
        return reader.read(cbuf, off, len);
    }
1347862
def read(self, data, offset=0):
        
        if isinstance(data, Buffer):
            return data.read(self)

        try:
            args = list(self._struct.unpack_from(data, offset))
        except TypeError as error:
            # Working around struct.unpack_from issue #10212
            logger.debug("error: %s", error)
            args = list(self._struct.unpack_from(str(bytearray(data)), offset))
        args.reverse()
        return self.popValue(args)
1250804
def read_tables(fstream):
    
    table = read_table(fstream)
    while table is not None:
        yield table
        table = read_table(fstream)
1328658
def read_array(self, dtype, count=-1, out=None):
        """"""
        fh = self._fh
        dtype = numpy.dtype(dtype)

        if count < 0:
            size = self._size if out is None else out.nbytes
            count = size // dtype.itemsize
        else:
            size = count * dtype.itemsize

        result = numpy.empty(count, dtype) if out is None else out

        if result.nbytes != size:
            raise ValueError('size mismatch')

        n = fh.readinto(result)
        if n != size:
            raise ValueError('failed to read %i bytes' % size)

        if not result.dtype.isnative:
            if not dtype.isnative:
                result.byteswap(True)
            result = result.newbyteorder()
        elif result.dtype.isnative != dtype.isnative:
            result.byteswap(True)

        if out is not None:
            if hasattr(out, 'flush'):
                out.flush()

        return result
1273716
public static List<String> readToList(File f) throws IOException {
		try (final Reader reader = asReaderUTF8Lenient(new FileInputStream(f))) {
			return readToList(reader);
		} catch (IOException ioe) {
			throw new IllegalStateException(String.format("Failed to read %s: %s", f.getAbsolutePath(), ioe), ioe);
		}
	}
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
217946
def read32(bytestream):
  """"""
  dt = np.dtype(np.uint32).newbyteorder('>')
  return np.frombuffer(bytestream.read(4), dtype=dt)[0]