Esempio n. 1
0
 public override int Read(byte[] buffer, int offset, int count)
 {
     byte[] data = m_file.ReadData((ulong)m_position, count);
     Array.Copy(data, 0, buffer, offset, data.Length);
     m_position += data.Length;
     return(data.Length);
 }
Esempio n. 2
0
 public override int Read(byte[] buffer, int offset, int count)
 {
     if (!m_canRead)
     {
         throw new AccessViolationException("Stream was not opened for read access");
     }
     byte[] data = m_file.ReadData((ulong)m_position, count);
     Array.Copy(data, 0, buffer, offset, data.Length);
     m_position += data.Length;
     return(data.Length);
 }