-
Notifications
You must be signed in to change notification settings - Fork 4
/
500.txt
30 lines (18 loc) · 1.35 KB
/
500.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
* 仕様書
[REFS[
- [1] [CITE@en[Streams Standard]] ([TIME[2017-06-15 14:03:49 +09:00]]) <https://streams.spec.whatwg.org/#byob-reader-class>
-- [2] [CITE@en[Streams Standard]] ([TIME[2017-06-15 14:03:49 +09:00]]) <https://streams.spec.whatwg.org/#byob-reader-read>
]REFS]
* [CODE[read][ReadableStreamBYOBReader]] メソッド
[3] [CODE[ArrayBufferView]] を[[引数]]として指定する必要があります。
(何も指定しなくて良い [CODE[ReadableStreamDefaultReader]] とは異なります。)
[4] 指定された [CODE[ArrayBufferView]] から参照された [CODE[ArrayBuffer]]
は可能なら読み込み先として使われます。
[5] しかし [CODE[ArrayBuffer]] は新しいものに [[transfer][TransferArrayBuffer]]
されるため、[[引数]]として指定された [CODE[ArrayBufferView]]
と参照されている [CODE[ArrayBuffer]] は使えなくなります。
[6] データの読み込みは、 [CODE[read][ReadableStreamBYOBReader]] [[メソッド]]が返す[[オブジェクト]]の
[CODE[value][ReadableStreamBYOBReader]] として与えられる [CODE[ArrayBufferView]] を使うことになります。
[7] [CITE@en[What types does ReadableByteStream's reader's read(x) accept and return? · Issue #295 · whatwg/streams]]
([TIME[2017-07-10 17:44:21 +09:00]])
<https://github.com/whatwg/streams/issues/295>