WriteRequest
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSON 表示法 |
{
"resourceName": string,
"writeOffset": string,
"finishWrite": boolean,
"data": string
} |
字段 |
resourceName |
string
要写入的资源的名称。必须针对每个 Write() 操作的第一个 WriteRequest 设置此属性。如果在后续调用中设置了此参数,则它必须与第一个请求的值一致。
|
writeOffset |
string (int64 format)
相对于应写入数据的资源开头的偏移量。所有 WriteRequest 上都必须设置此参数。 在 Write() 操作的第一个 WriteRequest 中,它表示 Write() 调用的初始偏移量。该值必须等于 QueryWriteStatus() 调用返回的 committedSize 。 在后续调用中,必须设置此值,且必须等于前 writeOffset 项与之前在此数据流上发送的所有 data 内容包大小的总和。 值不正确会导致错误。
|
finishWrite |
boolean
如果为 true ,则表示写入已完成。如果后续发送任何 WriteRequest ,但 finishWrite 为 true ,则会导致错误。
|
data |
string (bytes format)
资源的一部分数据。对于任何给定的 WriteRequest ,客户端可以将 data 留空。这样,客户端可以在服务运行某项操作以生成更多数据时通知服务请求仍有效。 使用 base64 编码的字符串。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-25。"],[[["The ByteStream.Write request object allows writing data to a cloud resource, potentially in chunks."],["It requires specifying the resource name, data to write, and the write offset within the resource."],["For the initial write request, the offset should typically be 0, and for subsequent requests, it should be the cumulative size of previous writes."],["Setting `finishWrite` to true signals completion of the write operation, and further requests will result in an error."]]],["The ByteStream.Write request requires `resourceName` (set initially, and consistent thereafter), `writeOffset` (indicating data position, increasing cumulatively), `finishWrite` (a boolean flag signaling completion), and `data` (a base64-encoded string of resource data). The `writeOffset` must match the `committedSize`. Setting `finishWrite` to true prevents further writes. The `data` field can be empty to keep the request active. All the parameters are required unless otherwise specified.\n"]]