Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsByteBuffer.cpp File Reference
#include "nsByteBuffer.h"
#include "nsIInputStream.h"
#include "nsCRT.h"

Go to the source code of this file.


#define MIN_BUFFER_SIZE   32


NS_COM nsresult NS_NewByteBuffer (nsIByteBuffer **aInstancePtrResult, nsISupports *aOuter, PRUint32 aBufferSize)
 Create a new byte buffer using the given buffer size.

Define Documentation

Definition at line 43 of file nsByteBuffer.cpp.

Function Documentation

NS_COM nsresult NS_NewByteBuffer ( nsIByteBuffer **  aInstancePtrResult,
nsISupports *  aOuter,
PRUint32  aBufferSize = 0 

Create a new byte buffer using the given buffer size.

Definition at line 154 of file nsByteBuffer.cpp.

  nsresult rv;
  nsIByteBuffer* buf;
  rv = ByteBufferImpl::Create(aOuter, NS_GET_IID(nsIByteBuffer), (void**)&buf);
  if (NS_FAILED(rv)) return rv;
  rv = buf->Init(aBufferSize);
  if (NS_FAILED(rv)) {
    return rv;
  *aInstancePtrResult = buf;
  return rv;

Here is the call graph for this function:

Here is the caller graph for this function: