code: public int Get(byte[] pBuffer, int index, int nBytes) {
          int nTotalGetBytes = 0;
  
          if (pBuffer != null && nBytes > 0) {
              int nHeadBytes = Math.min(m_nEndCap - m_nHead, nBytes);
              int nFrontBytes = nBytes - nHeadBytes;
  
              System.arraycopy(m_pBuffer, m_nHead, pBuffer, index, nHeadBytes);
              nTotalGetBytes = nHeadBytes;
  
              if (nFrontBytes > 0) {
                  System.arraycopy(m_pBuffer, 0, pBuffer, index + nHeadBytes, nFrontBytes);
                  nTotalGetBytes += nFrontBytes;
              }
  
              RemoveHead(nBytes);
          }
  
          return nTotalGetBytes;
      }
docs: get data