Fingerprint_Card

Loading...
Searching...
No Matches
ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream Class Reference

A PartialInputStream is an InflaterInputStream whose data is only a part or subsection of a file. More...

Inheritance diagram for ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream:
[legend]
Collaboration diagram for ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream:
[legend]

## Public Member Functions
| PartialInputStream (ZipFile zipFile, long start, long length)
| Initialise a new instance of the PartialInputStream class.
override int | ReadByte ()
| Read a byte from this stream.
override void | Close ()
| Close this partial input stream.
override int | Read (byte[] buffer, int offset, int count)
| Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
override void | Write (byte[] buffer, int offset, int count)
| Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
override void | SetLength (long value)
| When overridden in a derived class, sets the length of the current stream.
override long | Seek (long offset, SeekOrigin origin)
| When overridden in a derived class, sets the position within the current stream.
override void | Flush ()
| Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

## Properties
override long | Position`[get, set]`
| Gets or sets the position within the current stream.
override long | Length`[get]`
| Gets the length in bytes of the stream.
override bool | CanWrite`[get]`
| Gets a value indicating whether the current stream supports writing.
override bool | CanSeek`[get]`
| Gets a value indicating whether the current stream supports seeking.
override bool | CanRead`[get]`
| Gets a value indicating whether the current stream supports reading.
override bool | CanTimeout`[get]`
| Gets a value that determines whether the current stream can time out.

## Private Attributes
ZipFile | zipFile_
Stream | baseStream_
long | start_
long | length_
long | readPos_
long | end_

## Detailed Description

A PartialInputStream is an InflaterInputStream whose data is only a part or subsection of a file.

## Constructor & Destructor Documentation

## ◆ PartialInputStream()

ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.PartialInputStream | ( | ZipFile | zipFile,
|  | long | start,
|  | long | length )

Initialise a new instance of the PartialInputStream class.

Parameters

  zipFile | The ZipFile containing the underlying stream to use for IO.
  start | The start of the partial data.
  length | The length of the partial data.

Here is the call graph for this function:

## Member Function Documentation

## ◆ Close()

override void ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.Close | ( |  | ) |

Close this partial input stream.

The underlying stream is not closed. Close the parent ZipFile class to do that.

## ◆ Flush()

override void ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.Flush | ( |  | ) |

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Exceptions

  T:System.IO.IOException | An I/O error occurs.

## ◆ Read()

override int ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.Read | ( | byte[] | buffer,
|  | int | offset,
|  | int | count )

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Parameters

  buffer | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
  offset | The zero-based byte offset in buffer at which to begin storing the data read from the current stream.
  count | The maximum number of bytes to be read from the current stream.

Returns
  The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.

Exceptions

  T:System.ArgumentException | The sum of offset and count is larger than the buffer length.
  T:System.ObjectDisposedException | Methods were called after the stream was closed.
  T:System.NotSupportedException | The stream does not support reading.
  T:System.ArgumentNullException | buffer is null.
  T:System.IO.IOException | An I/O error occurs.
  T:System.ArgumentOutOfRangeException | offset or count is negative.

## ◆ ReadByte()

override int ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.ReadByte | ( |  | ) |

Read a byte from this stream.

Returns
  Returns the byte read or -1 on end of stream.

## ◆ Seek()

override long ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.Seek | ( | long | offset,
|  | SeekOrigin | origin )

When overridden in a derived class, sets the position within the current stream.

Parameters

  offset | A byte offset relative to the origin parameter.
  origin | A value of type T:System.IO.SeekOrigin indicating the reference point used to obtain the new position.

Returns
  The new position within the current stream.

Exceptions

  T:System.IO.IOException | An I/O error occurs.
  T:System.NotSupportedException | The stream does not support seeking, such as if the stream is constructed from a pipe or console output.
  T:System.ObjectDisposedException | Methods were called after the stream was closed.

## ◆ SetLength()

override void ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.SetLength | ( | long | value | ) |

When overridden in a derived class, sets the length of the current stream.

Parameters

  value | The desired length of the current stream in bytes.

Exceptions

  T:System.NotSupportedException | The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output.
  T:System.IO.IOException | An I/O error occurs.
  T:System.ObjectDisposedException | Methods were called after the stream was closed.

## ◆ Write()

override void ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.Write | ( | byte[] | buffer,
|  | int | offset,
|  | int | count )

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Parameters

  buffer | An array of bytes. This method copies count bytes from buffer to the current stream.
  offset | The zero-based byte offset in buffer at which to begin copying bytes to the current stream.
  count | The number of bytes to be written to the current stream.

Exceptions

  T:System.IO.IOException | An I/O error occurs.
  T:System.NotSupportedException | The stream does not support writing.
  T:System.ObjectDisposedException | Methods were called after the stream was closed.
  T:System.ArgumentNullException | buffer is null.
  T:System.ArgumentException | The sum of offset and count is greater than the buffer length.
  T:System.ArgumentOutOfRangeException | offset or count is negative.

## Member Data Documentation

## ◆ baseStream_

Stream ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.baseStream_
| private

## ◆ end_

long ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.end_
| private

## ◆ length_

long ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.length_
| private

## ◆ readPos_

long ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.readPos_
| private

## ◆ start_

long ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.start_
| private

## ◆ zipFile_

ZipFile ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.zipFile_
| private

## Property Documentation

## ◆ CanRead

override bool ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.CanRead
| get

Gets a value indicating whether the current stream supports reading.

true.

Returns
  true if the stream supports reading; otherwise, false.

## ◆ CanSeek

override bool ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.CanSeek
| get

Gets a value indicating whether the current stream supports seeking.

true

Returns
  true if the stream supports seeking; otherwise, false.

## ◆ CanTimeout

override bool ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.CanTimeout
| get

Gets a value that determines whether the current stream can time out.

Returns
  A value that determines whether the current stream can time out.

## ◆ CanWrite

override bool ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.CanWrite
| get

Gets a value indicating whether the current stream supports writing.

false

Returns
  true if the stream supports writing; otherwise, false.

## ◆ Length

override long ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.Length
| get

Gets the length in bytes of the stream.

Returns
  A long value representing the length of the stream in bytes.

Exceptions

  T:System.NotSupportedException | A class derived from Stream does not support seeking.
  T:System.ObjectDisposedException | Methods were called after the stream was closed.

## ◆ Position

override long ICSharpCode.SharpZipLib.Zip.ZipFile.PartialInputStream.Position
| get set

Gets or sets the position within the current stream.

Returns
  The current position within the stream.

Exceptions

  T:System.IO.IOException | An I/O error occurs.
  T:System.NotSupportedException | The stream does not support seeking.
  T:System.ObjectDisposedException | Methods were called after the stream was closed.

The documentation for this class was generated from the following file:

- ICSharpCode.SharpZLib/Zip/ZipFile.cs