From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/ru/nsioutputstream/writefrom/index.html | 49 +++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 files/ru/nsioutputstream/writefrom/index.html (limited to 'files/ru/nsioutputstream/writefrom') diff --git a/files/ru/nsioutputstream/writefrom/index.html b/files/ru/nsioutputstream/writefrom/index.html new file mode 100644 index 0000000000..5c8ec79f8f --- /dev/null +++ b/files/ru/nsioutputstream/writefrom/index.html @@ -0,0 +1,49 @@ +--- +title: writeFrom +slug: nsIOutputStream/writeFrom +tags: + - Справочник_XPCOM_API +translation_of: Mozilla/Tech/XPCOM/Reference/Interface/nsIOutputStream/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.

+

См. также

+ +

-- cgit v1.2.3-54-g00ecf