43 references to Stream
WindowsBase (43)
Base\MS\Internal\IO\Packaging\CompoundFile\RightsManagementEncryptedStream.cs (4)
491
PackagingUtilities.CalculateOverlap(memStreamBlock.Offset, memStreamBlock.
Stream
.Length,
501
memStreamBlock.
Stream
.Seek(overlapBlockOffset - memStreamBlock.Offset, SeekOrigin.Begin);
506
bytesRead = memStreamBlock.
Stream
.Read(buffer, bufferOffset, (int)overlapBlockSize);
776
long dirtyBlockSize = memStreamBlock.
Stream
.Length;
Base\MS\Internal\IO\Packaging\SparseMemoryStream.cs (39)
124
memStreamBlock.
Stream
.SetLength(temp);
133
_memoryStreamList[i].
Stream
.Close(); // we need to carefully close the memoryStreams so they properly report the memory usage
237
PackagingUtilities.CalculateOverlap(memStreamBlock.Offset, (int)memStreamBlock.
Stream
.Length,
244
Array.Copy(memStreamBlock.
Stream
.GetBuffer(), (int)(overlapBlockOffset - memStreamBlock.Offset),
420
memStreamBlock.
Stream
.Close();
500
long gap = offset - (memStreamBlock.Offset + memStreamBlock.
Stream
.Length);
507
&& gap + length + memStreamBlock.
Stream
.Length <= Int32.MaxValue)
538
prevMemStreamBlock.
Stream
.Seek(0, SeekOrigin.End);
539
SkipWrite(prevMemStreamBlock.
Stream
, prevMemStreamBlock.EndOffset, _currentStreamPosition);
540
prevMemStreamBlock.
Stream
.Write(buffer, offset, count);
549
if (prevMemStreamBlock.
Stream
.Length + count <= Int32.MaxValue) // Make sure there is enough space to append
551
prevMemStreamBlock.
Stream
.Seek(_currentStreamPosition - prevMemStreamBlock.Offset, SeekOrigin.Begin);
552
prevMemStreamBlock.
Stream
.Write(buffer, offset, count);
559
prevMemStreamBlock.
Stream
.SetLength(_currentStreamPosition - prevMemStreamBlock.Offset);
560
Debug.Assert(prevMemStreamBlock.
Stream
.Length > 0);
567
Debug.Assert(prevMemStreamBlock.
Stream
.Length > 0);
581
_memoryStreamList[i].
Stream
.Close(); // we need to carefully close the memoryStreams so they properly report the memory usage
603
&& (CanCollapseWithPreviousBlock(prevMemStreamBlock, memStreamBlock.Offset, memStreamBlock.
Stream
.Length)))
609
prevMemStreamBlock.
Stream
.Seek(0, SeekOrigin.End);
610
SkipWrite(prevMemStreamBlock.
Stream
, _currentStreamPosition, memStreamBlock.Offset);
611
prevMemStreamBlock.
Stream
.Write(memStreamBlock.
Stream
.GetBuffer(), 0, (int) memStreamBlock.
Stream
.Length);
618
int leftoverSize = (int) (memStreamBlock.
Stream
.Length - blockOffset);
620
if (prevMemStreamBlock.
Stream
.Length + leftoverSize <= Int32.MaxValue)
622
prevMemStreamBlock.
Stream
.Seek(0, SeekOrigin.End);
623
prevMemStreamBlock.
Stream
.Write(memStreamBlock.
Stream
.GetBuffer(), (int) blockOffset, leftoverSize);
627
memStreamBlock = ConstructMemoryStreamFromWriteRequest(memStreamBlock.
Stream
.GetBuffer(),
631
Debug.Assert(memStreamBlock.
Stream
.Length > 0);
649
newMemStreamBlock.
Stream
.Seek(0,SeekOrigin.Begin);
650
newMemStreamBlock.
Stream
.Write(buffer,bufferOffset,writeRequestSize);
675
newMemStreamBlock.
Stream
.Seek(0, SeekOrigin.Begin);
676
PackagingUtilities.CopyStream(_isolatedStorageStream, newMemStreamBlock.
Stream
,
681
Debug.Assert(newMemStreamBlock.
Stream
.Length > 0);
723
memStreamBlock.
Stream
.Close();
753
targetStream.Write(memStreamBlock.
Stream
.GetBuffer(), 0, (int)memStreamBlock.
Stream
.Length);
754
trackingPosition += memStreamBlock.
Stream
.Length;