public override int Read(byte[] buffer, int offset, int count)
 {
     do
     {
         if (dataLength != 0)
         {
             int count2 = (dataLength > count || dataLength < 0) ? count : dataLength;
             int num    = m_in.Read(buffer, offset, count2);
             if (num < 1)
             {
                 throw new EndOfStreamException("Premature end of stream in PartialInputStream");
             }
             dataLength -= num;
             return(num);
         }
     }while (partial && ReadPartialDataLength() >= 0);
     return(0);
 }