This method returns a block of data copied from the stream.
[noscript] string read( in unsigned long aCount );
nsIInputStream::isNonBlocking returns true. Language bindings, such as JavaScript, may interpret null bytes within the stream as null-terminators, and may therefore return a truncated value as the result of this method. It is important to keep this limitation in mind when using the result returned by this method.
It is also important to consider how a language bindings may interpret the string data type. In particular, some bindings may convert the byte values into Unicode code points, by assuming the byte values are encoded as ISO-Latin-1. This is the case for the JavaScript bindings.
Page last modified 21:27, 23 Apr 2006 by Pmash