BitMiracle.LibTiff.Classic.TiffStream.Read C# (CSharp) Method

Read() public method

Reads a sequence of bytes from the stream and advances the position within the stream by the number of bytes read.
public Read ( object clientData, byte buffer, int offset, int count ) : int
clientData object A client data (by default, an underlying stream).
buffer byte An array of bytes. When this method returns, the /// contains the specified byte array with the values between /// and ( + - 1) /// replaced by the bytes read from the current source.
offset int The zero-based byte offset in at which /// to begin storing the data read from the current stream.
count int The maximum number of bytes to be read from the current stream.
return int
        public virtual int Read(object clientData, byte[] buffer, int offset, int count)
        {
            Stream stream = clientData as Stream;
            if (stream == null)
                throw new ArgumentException("Can't get underlying stream to read from");

            return stream.Read(buffer, offset, count);
        }