PeerCastStation.FLV.FLVFileParser.ReadBytes C# (CSharp) Method

ReadBytes() private method

private ReadBytes ( Stream stream, int len, bool &eos ) : byte[]
stream Stream
len int
eos bool
return byte[]
		private byte[] ReadBytes(Stream stream, int len, out bool eos)
		{
			var res = new byte[len];
			var read = stream.Read(res, 0, len);
			eos = read<len;
			return res;
		}

Usage Example

Beispiel #1
0
            public bool ReadBody(Stream stream)
            {
                bool eos;

                this.Body = owner.ReadBytes(stream, this.DataSize, out eos);
                return(!eos);
            }