Example #1
0
 public int Read(long pos, byte[] buf)
 {
     if (Listener != null)
     {
         Listener.OnRead(pos, buf.Length, 0);
     }
     return(0);
 }
Example #2
0
        /// <summary>
        /// Read method
        /// </summary>
        /// <param name="pos">Zero-based position</param>
        /// <param name="buf">Buffer where to store <c>buf.Length</c> byte(s) read from the stream</param>
        public int Read(long pos, byte[] buf)
        {
            stream.Position = pos + offset;
            int len = stream.Read(buf, 0, buf.Length);

            if (Listener != null)
            {
                Listener.OnRead(pos, buf.Length, len);
            }
            return(len);
        }