Starts the copy operation. The specified observer is notified when the copy completes.
void asyncCopy( in nsIRequestObserver aObserver, in nsISupports aObserverContext );
- Receives notifications.
- The object to receive notifications with information about the progress of the copy operation.
Initializes the stream copier.
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 );
- Contains the data to be copied.
- Specifies the destination for the data.
- Specifies the thread on which the copy will occur. A
nullvalue is permitted and causes the copy to occur on an unspecified background thread.
- Specifies how many bytes to read and write at a time. This controls the granularity of the copy operation. This value should match the segment size of any buffered streams involved in the operation.
aSourceshould be closed after copying.
aSinkshould be closed after copying.