nsIBinaryOutputStream
. This might be used, for example, to implement network protocols or to read from architecture-neutral disk files, that is ones that can be read and written by both big-endian and little-endian platforms.
nsIInputStream
Last changed in Gecko 1.7 PRUint8 read8(); |
PRUint16 read16(); |
PRUint32 read32(); |
PRUint64 read64(); |
unsigned long readArrayBuffer(in PRUint32 aLength, in jsval aArrayBuffer); |
PRBool readBoolean(); |
void readByteArray(in PRUint32 aLength, [array, size_is(aLength), retval] out PRUint8 aBytes); |
void readBytes(in PRUint32 aLength, [size_is(aLength), retval] out string aString); |
ACString readCString(); |
double readDouble(); |
float readFloat(); |
AString readString(); |
void setInputStream(in nsIInputStream aInputStream); |
Reads from the stream.
PRUint8 read8();
None.
An 8-bit integer read from the stream.
Reads from the stream.
PRUint16 read16();
None.
A 16-bit integer read from the stream.
Reads from the stream.
PRUint32 read32();
None.
A 32-bit integer read from the stream.
Reads from the stream.
PRUint64 read64();
None.
A 64-bit integer read from the stream.
Read opaque bytes from the stream, storing the results in an ArrayBuffer.
unsigned long readArrayBuffer(in PRUint32 aLength, in jsval aArrayBuffer);
aLength
aArrayBuffer
The number of bytes actually read into aArrayBuffer.
Reads an 8-bit value from the stream, treating it as a Boolean value.
PRBool readBoolean();
None.
A boolean value read from the stream.
Reads an opaque byte array from the stream, storing the results as an array of PRUint8s.
void readByteArray( in PRUint32 aLength, [array, size_is(aLength), retval] out PRUint8 aBytes );
aLength
aBytes
NS_ERROR_FAILURE
Reads an opaque byte array from the stream.
void readBytes( in PRUint32 aLength, [size_is(aLength), retval] out string aString );
aLength
aString
NS_ERROR_FAILURE
Reads an 8-bit pascal style string from the stream. 32-bit length field, followed by length 8-bit chars.
ACString readCString();
None.
The string read from the stream.
Reads from the stream.
double readDouble();
None.
A double
read from the stream.
Reads from the stream.
float readFloat();
None.
A float
read from the stream.
Reads an 16-bit pascal style string from the stream. 32-bit length field, followed by length PRUnichars.
AString readString();
None.
The string read from the stream.
void setInputStream( in nsIInputStream aInputStream );
aInputStream