Пример #1
0
 public PushbackStream(Stream s, int backBufferSize)
 {
     m_Stream             = s;
     m_BackBufferSize     = backBufferSize;
     m_TemporaryBuffer    = new byte[m_BackBufferSize];
     m_CircularByteBuffer = new CircularByteBuffer(m_BackBufferSize);
 }
Пример #2
0
 /// <summary>
 ///     Initialize by copying the CircularByteBuffer passed in
 /// </summary>
 public CircularByteBuffer(CircularByteBuffer cdb)
 {
     lock (cdb)
     {
         m_Length    = cdb.m_Length;
         m_NumValid  = cdb.m_NumValid;
         m_Index     = cdb.m_Index;
         m_DataArray = new byte[m_Length];
         for (int c = 0; c < m_Length; c++)
         {
             m_DataArray[c] = cdb.m_DataArray[c];
         }
     }
 }