nsIScriptableInputStream provides scriptable access to an nsIInputStream
instance.
Closes the stream.
Wrap the given nsIInputStream with this nsIScriptableInputStream.
aInputStream | parameter providing the stream to wrap |
Return the number of bytes currently available in the stream
@throws NS_BASE_STREAM_CLOSED if called after the stream has been closed
the number of bytes |
Read data from the stream.
WARNING: If the data contains a null byte, then this method will return
a truncated string.
@throws NS_BASE_STREAM_CLOSED if called after the stream has been closed
@throws NS_ERROR_NOT_INITIALIZED if init was not called
aCount | the maximum number of bytes to read |
the data, which will be an empty string if the stream is at EOF. |
Read data from the stream, including NULL bytes.
@throws NS_BASE_STREAM_WOULD_BLOCK if reading from the input stream
would block the calling thread (non-blocking mode only).
@throws NS_ERROR_FAILURE if there are not enough bytes available to read
aCount amount of data.
aCount | the maximum number of bytes to read. |
the data from the stream, which will be an empty string if EOF has been reached. |