public int Read(byte[] ba, int offset = 0, int count = 0) { Stream stream = buffer.getStream(); if (stream == null) { return(0); } if (count == 0 || count + this.Position > this.size) { count = (int)(this.size - this.Position); } int bytesRead = stream.Read(ba, offset, count); return(bytesRead); }
public int Read(byte[] ba, int offset = 0, int count = 0) { Stream stream = buffer.getStream(); if (stream == null) { return(0); } if (count == 0 || this.start + count > this.end) { count = (int)(this.end - this.start); } int bytesRead = stream.Read(ba, offset, count); return(bytesRead); }