src/Cassandra/Utils.cs
/// <summary>
/// Reads all the bytes in the stream from a given position
/// </summary>
Reads all the bytes in the stream from a given position
Reads all the bytes in the stream from a given position
public static byte[] ReadAllBytes(IEnumerable<Stream> streamList, long totalLength)
        {
            var buffer = new byte[totalLength];
            var offset = 0;
            foreach (var stream in streamList)
            {
                stream.Position = 0;
                var itemLength = (int) stream.Length;
                stream.Read(buffer, offset, itemLength);
                offset += itemLength;
            }
            return buffer;
        }
public static byte [ ] ReadAllBytes ( IEnumerable < Stream > streamList , long totalLength ) { var buffer = new byte [ totalLength ] ; var offset = 0 ; foreach ( var stream in streamList ) { stream . Position = 0 ; var itemLength = ( int ) stream . Length ; stream . Read ( buffer , offset , itemLength ) ; offset += itemLength ; } return buffer ; }
Reads all the bytes in the stream from a given position
Reads all the bytes in the stream from a given position
streamList
IEnumerable<Stream>
totalLength
long