Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsIInputStream.idl" |
michael@0 | 6 | #include "nsIOutputStream.idl" |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * An input stream that reads ahead and keeps a buffer coming from another input |
michael@0 | 10 | * stream so that fewer accesses to the underlying stream are necessary. |
michael@0 | 11 | */ |
michael@0 | 12 | [scriptable, uuid(616f5b48-da09-11d3-8cda-0060b0fc14a3)] |
michael@0 | 13 | interface nsIBufferedInputStream : nsIInputStream |
michael@0 | 14 | { |
michael@0 | 15 | /** |
michael@0 | 16 | * @param fillFromStream - add buffering to this stream |
michael@0 | 17 | * @param bufferSize - specifies the maximum buffer size |
michael@0 | 18 | */ |
michael@0 | 19 | void init(in nsIInputStream fillFromStream, |
michael@0 | 20 | in unsigned long bufferSize); |
michael@0 | 21 | }; |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * An output stream that stores up data to write out to another output stream |
michael@0 | 25 | * and does the entire write only when the buffer is full, so that fewer writes |
michael@0 | 26 | * to the underlying output stream are necessary. |
michael@0 | 27 | */ |
michael@0 | 28 | [scriptable, uuid(6476378a-da09-11d3-8cda-0060b0fc14a3)] |
michael@0 | 29 | interface nsIBufferedOutputStream : nsIOutputStream |
michael@0 | 30 | { |
michael@0 | 31 | /** |
michael@0 | 32 | * @param sinkToStream - add buffering to this stream |
michael@0 | 33 | * @param bufferSize - specifies the maximum buffer size |
michael@0 | 34 | */ |
michael@0 | 35 | void init(in nsIOutputStream sinkToStream, |
michael@0 | 36 | in unsigned long bufferSize); |
michael@0 | 37 | }; |