client.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:alluxio-py 作者: Alluxio 项目源码 文件源码
def read(self, n=None):
        """Read the file stream.

        Args:
            n (int, optional): The bytes to read from the stream, if n is None,
                it means read the whole data stream.

        Returns:
            The data in bytes, if all data has been read, returns an empty string.
        """

        if self.r is None:
            self._init_r()
        try:
            if n is None:
                return self.r.content
            return self.r.raw.read(n)
        except requests.RequestException:
            raise_with_traceback(exceptions.HTTPError, 'Failed to read the response body')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号