Back to index

lightning-sunbird  0.9+nobinonly
nsByteArrayInputStream.cpp File Reference
#include "nsByteArrayInputStream.h"
#include "nsMemory.h"

Go to the source code of this file.


NS_COM nsresult NS_NewByteArrayInputStream (nsIByteArrayInputStream **aResult, char *buffer, unsigned long bytes)

Function Documentation

NS_COM nsresult NS_NewByteArrayInputStream ( nsIByteArrayInputStream **  aResult,
char *  buffer,
unsigned long  bytes 

Definition at line 151 of file nsByteArrayInputStream.cpp.

    if (aResult == NULL)
        return NS_ERROR_NULL_POINTER;

    nsIByteArrayInputStream * stream = new nsByteArrayInputStream (buffer, bytes);

    if (!stream)
        return NS_ERROR_OUT_OF_MEMORY;

    NS_ADDREF (stream);
    *aResult = stream;
    return NS_OK;

Here is the call graph for this function:

Here is the caller graph for this function: