File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Amazon Simple Storage Service
44
55## Binary Data
66
7- Binary data (streams) are represented as an [ software. aws.clientrt .content.ByteStream] .
7+ Binary data (streams) are represented as an [ aws.smithy.kotlin.runtime .content.ByteStream] .
88
99To supply a ` ByteStream ` there are several convenience functions including:
1010
@@ -15,21 +15,19 @@ val req = PutObjectRequest {
1515 // body = ByteStream.fromBytes(byteArray)
1616 // body = ByteStream.fromString("string")
1717}
18-
1918```
2019
2120Consuming a ` ByteStream ` similarly has easy ways to consume the stream:
2221
2322``` kt
24- s3.getObjet (req) { resp -> {
23+ s3.getObject (req) { resp -> {
2524 // resp.body is a ByteStream instance
2625 resp.body?.writeToFile(path)
2726
2827 // NOTE: both of these will consume the stream and buffer it entirely in-memory!
2928 // resp.body?.toByteArray()
3029 // resp.body?.decodeToString()
3130}
32-
3331```
3432
3533See [aws.sdk.kotlin.services.s3.model.GetObjectResponse ]
You can’t perform that action at this time.
0 commit comments