aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/blob/stream
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/blob/stream
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/blob/stream')
-rw-r--r--files/ja/web/api/blob/stream/index.html71
1 files changed, 71 insertions, 0 deletions
diff --git a/files/ja/web/api/blob/stream/index.html b/files/ja/web/api/blob/stream/index.html
new file mode 100644
index 0000000000..f5c394e2e7
--- /dev/null
+++ b/files/ja/web/api/blob/stream/index.html
@@ -0,0 +1,71 @@
+---
+title: Blob.stream()
+slug: Web/API/Blob/stream
+tags:
+ - API
+ - Blob
+ - Change
+ - Convert
+ - File API
+ - Method
+ - ReadableStream
+ - Reference
+ - stream
+translation_of: Web/API/Blob/stream
+---
+<p>{{APIRef("File API")}}</p>
+
+<p><span class="seoSummary">{{domxref("Blob")}} インターフェイスの<code><strong>stream()</strong></code> メソッドは、{{domxref("ReadableStream")}} を返します。これは、読み取り時に、<code>Blob</code> に含まれるデータを返します。</span></p>
+
+<h2 id="シンタックス">シンタックス</h2>
+
+<pre class="syntaxbox notranslate">var <em>stream</em> = <em>blob</em>.stream();</pre>
+
+<h3 id="パラメータ">パラメータ</h3>
+
+<p>なし</p>
+
+<h3 id="戻り値">戻り値</h3>
+
+<p>読み込んだときに、<code>Blob</code> の内容を {{domxref("ReadableStream")}} で返します。</p>
+
+<h2 id="使用上のメモ">使用上のメモ</h2>
+
+<p><code>stream()</code> と返された {{domxref("ReadableStream")}} を使用すると、いくつかの興味深い機能を得ることができます。</p>
+
+<ul>
+ <li>返されたストリーム上で{{domxref("ReadableStream.getReader", "getReader()")}} を呼び出して、{{domxref("ReadableStreamDefaultReader")}} インターフェイスの{{domxref("ReadableStreamDefaultReader.read", "read()")}} メソッドのようなメソッドを使用して、Blob からデータを読み取るために使用するオブジェクトを取得します</li>
+ <li>返されたストリームの {{domxref("ReadableStream.pipeTo", "pipeTo()")}} メソッドを呼び出して、Blob のデータを書き込み可能なストリームにパイプします</li>
+ <li>返されたストリームの {{domxref("ReadableStream.tee", "tee()")}} メソッドを呼び出して、可読ストリームを <strong>tee</strong> します。これは、2つの新しい <code>ReadableStream</code> オブジェクトを含む配列を返し、それぞれが <code>Blob</code> の内容を返します</li>
+ <li>返されたストリームの {{domxref("ReadableStream.pipeThrough", "pipeThrough()")}} メソッドを呼び出して、ストリームを {{domxref("TransformStream")}} またはその他の可読および書き込み可能なペアにパイプします</li>
+</ul>
+
+<h2 id="仕様">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様書</th>
+ <th scope="col">ステータス</th>
+ <th scope="col">コメント</th>
+ </tr>
+ <tr>
+ <td>{{SpecName("File API", "#dom-blob-stream", "Blob.stream()")}}</td>
+ <td>{{Spec2("File API")}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="ブラウザの互換性">ブラウザの互換性</h2>
+
+<div class="hidden">このページの互換性一覧表は、構造化データから生成されています。データに貢献したい方は、https://github.com/mdn/browser-compat-data をチェックしてプルリクエストを送ってください。</div>
+
+<p>{{Compat("api.Blob.stream")}}</p>
+
+<h2 id="あわせて参照">あわせて参照</h2>
+
+<ul>
+ <li>{{domxref("Body.body")}}</li>
+ <li><a href="/en-US/docs/Web/API/Streams_API">Streams API</a></li>
+</ul>