Class ZipFileStream
Represents read-only stream from the zip file.
public sealed class ZipFileStream : FileStream
- Inheritance
-
objectMarshalByRefObjectStreamZipFileStream
- Inherited Members
- Extension Methods
Constructors
ZipFileStream(ZipStorageProvider, string)
Initializes new instance and initializes new system file stream.
public ZipFileStream(ZipStorageProvider provider, string path)
Parameters
provider
ZipStorageProviderZip provider
path
stringPath to file.
Properties
CanRead
Gets a value indicating whether the current stream supports reading.
public override bool CanRead { get; }
Property Value
- bool
CanSeek
Gets a value indicating whether the current stream supports seeking.
public override bool CanSeek { get; }
Property Value
- bool
True if the stream supports seeking, false otherwise.
CanWrite
Gets a value indicating whether the current stream supports writing.
public override bool CanWrite { get; }
Property Value
- bool
Length
Gets the length in bytes of the stream.
public override long Length { get; }
Property Value
- long
Position
Gets or sets the position within the current stream.
public override long Position { get; set; }
Property Value
- long
Methods
Dispose(bool)
Releases all unmanaged and optionally managed resources.
protected override void Dispose(bool disposing)
Parameters
disposing
boolWhen true, managed resources are released.
Flush()
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
public override void Flush()
Read(byte[], int, int)
Reads data from stream and stores them into array.
public override int Read(byte[] array, int offset, int count)
Parameters
array
byte[]Array where result is stored
offset
intOffset from beginning of file
count
intNumber of characters which are read
Returns
- int
Seek(long, SeekOrigin)
Sets cursor position at specified position.
public override long Seek(long offset, SeekOrigin loc)
Parameters
offset
longOffset from beginning of file
loc
SeekOriginReference points for seeking in the stream
Returns
- long
SetLength(long)
Sets the length of the current stream.
public override void SetLength(long value)
Parameters
value
longThe desired length of the current stream in bytes.
Write(byte[], int, int)
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
public override void Write(byte[] buffer, int offset, int count)
Parameters
buffer
byte[]Buffer
offset
intOffset
count
intNumber of chars
WriteByte(byte)
Writes byte to stream.
public override void WriteByte(byte value)
Parameters
value
byteValue to write