aboutsummaryrefslogtreecommitdiff
path: root/files/ru/nsioutputstream/writefrom/index.html
blob: 5c8ec79f8f8a488e26f4c3ac0f0be9e2939345a0 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
title: writeFrom
slug: nsIOutputStream/writeFrom
tags:
  - Справочник_XPCOM_API
translation_of: Mozilla/Tech/XPCOM/Reference/Interface/nsIOutputStream/writeFrom
---
<p>« <a href="/ru/docs/%d0%a1%d0%bf%d1%80%d0%b0%d0%b2%d0%be%d1%87%d0%bd%d0%b8%d0%ba_XPCOM_API">Справочник XPCOM API</a></p>
<h3 id="Summary" name="Summary">Summary</h3>
<p>Этот метод копирует данные из <code><a href="ru/NsIInputStream">nsIInputStream</a></code> в <code>nsIOutputStream</code>.</p>
<pre class="eval"> unsigned long writeFrom(
   in nsIInputStream aSource,
   in unsigned long aCount
 );
</pre>
<h3 id=".D0.9F.D0.B0.D1.80.D0.B0.D0.BC.D0.B5.D1.82.D1.80.D1.8B" name=".D0.9F.D0.B0.D1.80.D0.B0.D0.BC.D0.B5.D1.82.D1.80.D1.8B">Параметры</h3>
<dl>
 <dt>
  aSource</dt>
 <dd>
  [in] An nsIInputStream containing the data to be written.</dd>
 <dt>
  aCount</dt>
 <dd>
  [in] The maximum number of bytes to write to the stream.</dd>
</dl>
<h3 id=".D0.92.D0.BE.D0.B7.D0.B2.D1.80.D0.B0.D1.89.D0.B0.D0.B5.D0.BC.D1.8B.D0.B5_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D1.8F" name=".D0.92.D0.BE.D0.B7.D0.B2.D1.80.D0.B0.D1.89.D0.B0.D0.B5.D0.BC.D1.8B.D0.B5_.D0.B7.D0.BD.D0.B0.D1.87.D0.B5.D0.BD.D0.B8.D1.8F">Возвращаемые значения</h3>
<p>Этот метод возвращает количество байт, записанных в поток.</p>
<h3 id="Exceptions_Thrown" name="Exceptions_Thrown">Exceptions Thrown</h3>
<dl>
 <dt>
  NS_BASE_STREAM_WOULD_BLOCK</dt>
 <dd>
  Indicates that writing to the output stream would block the calling thread for an indeterminate amount of time. This exception may only be thrown if <code><a href="ru/NsIOutputStream/isNonBlocking">isNonBlocking</a></code> returns true.</dd>
 <dt>
  NS_ERROR_NOT_IMPLEMENTED</dt>
 <dd>
  Indicates that the stream does not implement this method. Typically, output streams that do not have an internal buffer will not implement this method since such an implementation would require an intermediate buffer unless aSource supported <code><a href="ru/NsIInputStream/readSegments">nsIInputStream::readSegments</a></code>, but that is not guaranteed.</dd>
</dl>
<h3 id="Remarks" name="Remarks">Remarks</h3>
<p>A <code>nsIOutputStream</code> is not required to implement this method. In some contexts, <code>writeFrom</code> may be guaranteed to be implemented, but in general it is not. This method serves as an optimization.</p>
<h3 id=".D0.A1.D0.BC._.D1.82.D0.B0.D0.BA.D0.B6.D0.B5" name=".D0.A1.D0.BC._.D1.82.D0.B0.D0.BA.D0.B6.D0.B5">См. также</h3>
<ul>
 <li><code><a href="ru/NsIOutputStream/isNonBlocking">nsIOutputStream::isNonBlocking</a></code></li>
 <li><code><a href="ru/NsIInputStream">nsIInputStream</a></code></li>
 <li><code><a href="ru/NsIOutputStream">nsIOutputStream</a></code></li>
 <li><code><a href="ru/NsIInputStream/readSegments">nsIInputStream::readSegments</a></code></li>
</ul>
<p></p>