---
title: BioGet
description: "对象读取接口。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2400/sds/kunpengboostIO_010.html
sourcePath: /source/zh/kunpengboostkithistory/2400/sds/kunpengboostIO_010.html
indexId: 56c5398af8cf46c2ac15676161ef3cfe01c980c9dcaf9525e89f2233f378daeb66
---
# BioGet

#### 函数定义

对象读取接口。


#### 实现方法

CResult BioGet(uint64_t tenantId, const char *key, uint64_t offset, uint64_t length, ObjLocation location, char *value, uint64_t *realLength)


#### 参数说明


**表1 参数说明**

| 参数名 | 数据类型 | 参数类型 | 描述 |
| --- | --- | --- | --- |
| tenantId | uint64\_t | 入参 | 租户ID。 |
| key | const char\* | 入参 | 对象的key。 |
| offset | uint64\_t | 入参 | 待读取数据偏移。 |
| length | uint64\_t | 入参 | 读取的数据长度。 |
| location | ObjLocation | 入参 | 对象位置。 |
| value | char\* | 入参 | 待读取的数据buffer。 |
| realLength | uint64\_t\* | 出参 | 实际读取的数据长度。 |


#### 返回值


**表2 返回值说明**

| 返回值 | 描述 |
| --- | --- |
| RET\_CACHE\_OK | 操作成功。 |
| RET\_CACHE\_NOT\_FOUND | Cache实例不存在。 |
| RET\_CACHE\_EPERM | 传入参数错误。 |
| RET\_CACHE\_NOT\_READY | BoostIO服务未就绪。 |
| RET\_CACHE\_NEED\_RETRY | 需要外部重试。 |
| RET\_CACHE\_PT\_FAULT | 分区错误，对象位置无法写入。 |
| RET\_CACHE\_READ\_EXCEED | 读取数据长度超过写入长度。 |
| RET\_CACHE\_ERROR | 操作失败。 |
