public override long Read(Qyoto.Pointer <sbyte> data, long len) { if (len > Size() - Pos()) { len = Size() - Pos(); } if (len <= 0) { return(0); } int ilen = Convert.ToInt32(len); for (int i = 0; i < ilen; i++) { data[i] = (sbyte)m_Buffer[i]; } m_Pos += ilen; return(ilen); }
public override long Read(Qyoto.Pointer <sbyte> data, long len) { if (len > Size() - Pos()) { len = Size() - Pos(); } if (len <= 0) { return(0); } int ilen = Convert.ToInt32(len); byte[] buffer = new byte[ilen]; m_Stream.Seek(m_Pos, SeekOrigin.Begin); m_Stream.Read(buffer, 0, ilen); for (int i = 0; i < ilen; i++) { data[i] = (sbyte)buffer[i]; } m_Pos += ilen; return(ilen); }