Subclasses

Attributes

From nsIDOMLSOutput


          
attribute nsIOutputStream byteStream

From nsIFastLoadFileIO


          
readonly attribute nsIOutputStream outputStream

From nsIInputStreamTee


          
attribute nsIOutputStream sink

Returns

From nsICacheEntryDescriptor

 Open blocking output stream to cache data.  This will fail if the cache
 entry IS NOT stream based.  Use the stream transport service to
 asynchronously write to this stream on a background thread.  The returned
 stream MAY implement nsISeekableStream.

 If opening an output stream to existing cached data, the data will be
 truncated to the specified offset.

 @param offset
        write starting from this offset into the cached data.  an offset
        beyond the end of the stream has undefined consequences.

 @return blocking, unbuffered output stream.
nsIOutputStream openOutputStream(in unsigned long offset)

From nsIStorageStream

 Get a reference to the one and only output stream for this instance.
 The zero-based startPosition argument is used is used to set the initial
 write cursor position.  The startPosition cannot be set larger than the
 current buffer length.  Calling this method has the side-effect of
 truncating the internal buffer to startPosition bytes.
nsIOutputStream getOutputStream(in PRInt32 startPosition)

From nsITransport

 Open an output stream on this transport.

 Flags have the following meaning:

 OPEN_BLOCKING
   If specified, then the resulting stream will have blocking stream
   semantics.  This means that if the stream is full and is not closed,
   then writing to it will block the calling thread until ALL of the
   data can be written or until the stream is closed.  If this flag is
   NOT specified, then the stream has non-blocking stream semantics.
   This means that if the stream is full and is not closed, then writing
   to it returns NS_BASE_STREAM_WOULD_BLOCK.  In addition, in non-
   blocking mode, the stream is guaranteed to support
   nsIAsyncOutputStream.  This interface allows the consumer of the
   stream to be notified when the stream can again accept more data.

 OPEN_UNBUFFERED
   If specified, the resulting stream may not support WriteSegments and
   WriteFrom.  WriteSegments and WriteFrom are only gauranteed to be
   implemented when this flag is NOT specified.

 @param aFlags
        optional transport specific flags.
 @param aSegmentSize
        if OPEN_UNBUFFERED is not set, then this parameter specifies the
        size of each buffer segment (pass 0 to use default value).
 @param aSegmentCount
        if OPEN_UNBUFFERED is not set, then this parameter specifies the
        maximum number of buffer segments (pass 0 to use default value).
nsIOutputStream openOutputStream(in unsigned long aFlags, in unsigned long aSegmentSize, in unsigned long aSegmentCount)

Parameters

From nsIAppleFileDecoder

 Initialize the Apple File Decoder Output stream.

 @param outputStream     The output stream which the AppleFile Decoder will write to the data fork.
 @param outputFile       The output file which the AppleFile Decoder will write to the resource fork.
void Initialize(in nsIOutputStream outputStream, in nsIFile outputFile)

From nsIAsyncStreamCopier

 Initialize the stream copier.

 @param aSource
        contains the data to be copied.
 @param aSink
        specifies the destination for the data.
 @param aTarget
        specifies the thread on which the copy will occur.  a null value
        is permitted and will cause the copy to occur on an unspecified
        background thread.
 @param aSourceBuffered
        true if aSource implements ReadSegments.
 @param aSinkBuffered
        true if aSink implements WriteSegments.
 @param aChunkSize
        specifies how many bytes to read/write at a time.  this controls
        the granularity of the copying.  it should match the segment size
        of the "buffered" streams involved.
 @param aCloseSource
        true if aSource should be closed after copying.
 @param aCloseSink
        true if aSink should be closed after copying.

 NOTE: at least one of the streams must be buffered.
void init(in nsIInputStream aSource, in nsIOutputStream aSink, in nsIEventTarget aTarget, in boolean aSourceBuffered, in boolean aSinkBuffered, in unsigned long aChunkSize, in boolean aCloseSource, in boolean aCloseSink)

From nsIBinaryOutputStream


          
void setOutputStream(in nsIOutputStream aOutputStream)

From nsIBufferedOutputStream

 @param sinkToStream - add buffering to this stream
 @param bufferSize   - specifies the maximum buffer size
void init(in nsIOutputStream sinkToStream, in unsigned long bufferSize)

From nsIConverterOutputStream

 Initialize this stream. Must be called before any other method on this
 interface, or you will crash. The output stream passed to this method
 must not be null, or you will crash.

 @param aOutStream
        The underlying output stream to which the converted strings will
        be written.
 @param aCharset
        The character set to use for encoding the characters. A null
        charset will be interpreted as UTF-8.
 @param aBufferSize
        How many bytes to buffer. A value of 0 means that no bytes will be
        buffered. Implementations not supporting buffering may ignore
        this parameter.
 @param aReplacementCharacter
        The replacement character to use when an unsupported character is found.
        The character must be encodable in the selected character
        encoding; otherwise, attempts to write an unsupported character
        will throw NS_ERROR_LOSS_OF_SIGNIFICANT_DATA.

        A value of 0x0000 will cause an exception to be thrown upon
        attempts to write unsupported characters.
void init(in nsIOutputStream aOutStream, in string aCharset, in unsigned long aBufferSize, in PRUnichar aReplacementCharacter)

From nsIDOMSerializer

 The subtree rooted by the specified element is serialized to
 a byte stream using the character set specified.
 @param root The root of the subtree to be serialized. This could
             be any node, including a Document.
 @param stream The byte stream to which the subtree is serialized.
 @param charset The name of the character set to use for the encoding
                to a byte stream.  If this string is empty and root is
                a document, the document's character set will be used.
void serializeToStream(in nsIDOMNode root, in nsIOutputStream stream, in AUTF8String charset)

From nsIDocumentEncoder

  Encode the document and send the result to the nsIOutputStream.

  Possible result codes are the stream errors which might have
  been encountered.
 @param aStream Stream into which to encode.
void encodeToStream(in nsIOutputStream aStream)

From nsIEditor


          
void outputToStream(in nsIOutputStream aStream, in AString formatType, in ACString charsetOverride, in unsigned long flags)

From nsIFastLoadService


          
nsIObjectOutputStream newOutputStream(in nsIOutputStream aDestStream)

From nsIIOUtil

 Test whether an output stream is buffered.  See nsStreamUtils.h
 documentation for NS_OutputStreamIsBuffered for the definition of
 "buffered" used here and for edge-case behavior.

 @throws NS_ERROR_INVALID_POINTER if null is passed in.
boolean outputStreamIsBuffered(in nsIOutputStream aStream)

From nsIJSON


          
void encodeToStream(in nsIOutputStream stream, in string charset, in boolean writeBOM)

From nsIPersistentProperties

 output the values to the stream - results will be in UTF8
void save(in nsIOutputStream output, in AUTF8String header)

From nsIPluginInstance

 This operation is called by the plugin instance when it wishes to send
 a stream of data to the browser. It constructs a new output stream to which
 the plugin may send the data. When complete, the Close and Release methods
 should be called on the output stream.

 (Corresponds to NPN_NewStream.)

 @param aType   - MIME type of the stream to create
 @param aTarget - the target window name to receive the data
 @param aResult - the resulting output stream
 @result        - NS_OK if this operation was successful
void newStreamFromPlugin(in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult)

From nsIRDFXMLSource

 Serialize the contents of the datasource to aStream.
 @param aStream the output stream the will receive the
   RDF/XML. Currently, the output stream need only
   implement the |write()| method.
void Serialize(in nsIOutputStream aStream)

From nsISimpleStreamListener

 Initialize the simple stream listener.

 @param aSink data will be read from the channel to this output stream.
              Must implement writeFrom.
 @param aObserver optional stream observer (can be NULL)
void init(in nsIOutputStream aSink, in nsIRequestObserver aObserver)

From nsIStreamListenerTee


          
void init(in nsIStreamListener listener, in nsIOutputStream sink)

From nsIStreamTransportService

 CreateOutputTransport

 @param aStream
        The output stream that will be written to on a background thread.
        This stream must implement "blocking" stream semantics.
 @param aStartOffset
        The output stream will be written starting at this offset.  Pass
        -1 to write to the current stream offset.  NOTE: this parameter
        is ignored if the stream does not support nsISeekableStream.
 @param aWriteLimit
        This parameter limits the number of bytes that will be written to
        the output stream.  Pass -1 for unlimited writing.
 @param aCloseWhenDone
        Specify this flag to have the output stream closed once its
        contents have been completely written.

 @return nsITransport instance.
nsITransport createOutputTransport(in nsIOutputStream aStream, in long long aStartOffset, in long long aWriteLimit, in boolean aCloseWhenDone)

From rdfISerializer

 Synchronously serialize the given datasource to the outputstream.

 Implementations are not required to implement any buffering or
 other stream-based optimizations.

 @param aDataSource The RDF data source to be serialized.
 @param aOut The output stream to use.
void serialize(in rdfIDataSource aDataSource, in nsIOutputStream aOut)