Streams

Mozilla provides a number of stream interfaces which can be used for different purposes. The base interfaces nsIInputStream and nsIOutputStream provide methods for reading and writing respectively. Some components may support input only, output only or both input and output.

You can create a buffered reader or writer out of any other existing stream using nsIBufferedInputStream and nsIBufferedOutputStream. You can observe reading and writing to a stream using nsIObservableInputStream or nsIObservableOutputStream.

From script, you can use nsIScriptableInputStream to read from a stream. This interface will return strings.

nsIAsyncInputStream
nsIAsyncOutputStream
nsIAsyncStreamCopier
nsIAsyncStreamListener
nsIBinaryInputStream
nsIBinaryOutputStream
nsIBufferedInputStream
nsIBufferedOutputStream
nsIByteArrayInputStream
nsIConverterInputStream
nsIConverterOutputStream
nsIInputStream
nsIInputStreamCallback
nsIInputStreamPump
nsIInputStreamTee
nsILineInputStream
nsIMultiplexInputStream
nsIObjectInputStream
nsIObjectOutputStream
nsIOutputStream
nsIOutputStreamCallback
nsIPipe
nsISafeOutputStream
nsIScriptableInputStream
nsISearchableInputStream
nsISeekableStream
nsISimpleStreamListener
nsIStorageStream
nsIStreamBufferAccess
nsIStreamConverter
nsIStreamConverterService
nsIStreamListener
nsIStreamListenerProxy
nsIStreamListenerTee
nsIStreamLoader
nsIStreamLoaderObserver
nsIStreamTransportService
nsIStringInputStream
nsISyncStreamListener
nsIUnicharInputStream
nsIUnicharLineInputStream
nsIUnicharOutputStream
nsIUnicharStreamListener
nsIUnicharStreamLoader
nsIUnicharStreamLoaderObserver

@mozilla.org/binaryinputstream;1
@mozilla.org/binaryoutputstream;1
@mozilla.org/byte-buffer;1
@mozilla.org/io/multiplex-input-stream;1
@mozilla.org/io/string-input-stream;1
@mozilla.org/network/async-stream-copier;1
@mozilla.org/network/async-stream-listener;1
@mozilla.org/network/buffered-input-stream;1
@mozilla.org/network/buffered-output-stream;1
@mozilla.org/network/input-stream-io;1
@mozilla.org/network/input-stream-pump;1
@mozilla.org/network/simple-stream-listener;1
@mozilla.org/network/simple-stream-provider;1
@mozilla.org/network/stream-io-channel;1
@mozilla.org/network/stream-listener-proxy;1
@mozilla.org/network/stream-listener-tee;1
@mozilla.org/network/stream-loader;1
@mozilla.org/network/stream-provider-proxy;1
@mozilla.org/network/stream-transport-service;1
@mozilla.org/network/sync-stream-listener;1
@mozilla.org/network/unichar-stream-loader;1
@mozilla.org/pipe;1
@mozilla.org/scriptableinputstream;1
@mozilla.org/storagestream;1

Reference documentation is generated from Mozilla's source.