Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

writeFrom

« Справочник XPCOM API

Summary

Этот метод копирует данные из nsIInputStream в nsIOutputStream.

 unsigned long writeFrom(
   in nsIInputStream aSource,
   in unsigned long aCount
 );

Параметры

aSource
[in] An nsIInputStream containing the data to be written.
aCount
[in] The maximum number of bytes to write to the stream.

Возвращаемые значения

Этот метод возвращает количество байт, записанных в поток.

Exceptions Thrown

NS_BASE_STREAM_WOULD_BLOCK
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 isNonBlocking returns true.
NS_ERROR_NOT_IMPLEMENTED
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 nsIInputStream::readSegments, but that is not guaranteed.

Remarks

A nsIOutputStream is not required to implement this method. In some contexts, writeFrom may be guaranteed to be implemented, but in general it is not. This method serves as an optimization.

См. также

Метки документа и участники

 Внесли вклад в эту страницу: teoli, Dionys
 Обновлялась последний раз: teoli,