code: public void CreateBuffer(int nBytes, int nMaxDirectWriteBytes) {
          m_nMaxDirectWriteBytes = nMaxDirectWriteBytes;
          m_nTotal = nBytes + 1 + nMaxDirectWriteBytes;
          m_pBuffer = new byte[m_nTotal];
          byteBuffer = new ByteBuffer();
          m_nHead = 0;
          m_nTail = 0;
          m_nEndCap = m_nTotal;
      }
docs: create the buffer