C# 클래스 ICSharpCode.SharpZipLib.Zip.ZipInputStream

This is an InflaterInputStream that reads the files baseInputStream an zip archive one after another. It has a special method to get the zip entry of the next file. The zip entry contains information about the file name size, compressed size, Crc, etc. It includes support for Stored and Deflated entries.

Author of the original java version : Jochen Hoenicke
상속: ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream
파일 보기 프로젝트 열기: icsharpcode/SharpZipLib 1 사용 예제들

공개 메소드들

메소드 설명
CloseEntry ( ) : void

Closes the current zip entry and moves to the next one.

GetNextEntry ( ) : ZipEntry

Advances to the next entry in the archive

If the previous entry is still open CloseEntry is called.

Read ( byte buffer, int offset, int count ) : int

Read a block of bytes from the stream.

Zero bytes read means end of stream.

ReadByte ( ) : int

Reads a byte from the current zip entry.

ZipInputStream ( Stream baseInputStream ) : System

Creates a new Zip input stream, for reading a zip archive.

ZipInputStream ( Stream baseInputStream, int bufferSize ) : System

Creates a new Zip input stream, for reading a zip archive.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Closes the zip input stream

비공개 메소드들

메소드 설명
BodyRead ( byte buffer, int offset, int count ) : int

Reads a block of bytes from the current zip entry.

CompleteCloseEntry ( bool testCrc ) : void

Complete cleanup as the final part of closing.

InitialRead ( byte destination, int offset, int count ) : int

Perform the initial read on an entry which may include reading encryption headers and setting up inflation.

ReadDataDescriptor ( ) : void

Read data descriptor at the end of compressed data.

ReadingNotAvailable ( byte destination, int offset, int count ) : int

Handle attempts to read by throwing an InvalidOperationException.

ReadingNotSupported ( byte destination, int offset, int count ) : int

Handle attempts to read from this entry by throwing an exception

메소드 상세

CloseEntry() 공개 메소드

Closes the current zip entry and moves to the next one.
/// The stream is closed /// /// The Zip stream ends early ///
public CloseEntry ( ) : void
리턴 void

Dispose() 보호된 메소드

Closes the zip input stream
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

GetNextEntry() 공개 메소드

Advances to the next entry in the archive
If the previous entry is still open CloseEntry is called.
/// Input stream is closed /// /// Password is not set, password is invalid, compression method is invalid, /// version required to extract is not supported ///
public GetNextEntry ( ) : ZipEntry
리턴 ZipEntry

Read() 공개 메소드

Read a block of bytes from the stream.
Zero bytes read means end of stream.
public Read ( byte buffer, int offset, int count ) : int
buffer byte The destination for the bytes.
offset int The index to start storing data.
count int The number of bytes to attempt to read.
리턴 int

ReadByte() 공개 메소드

Reads a byte from the current zip entry.
public ReadByte ( ) : int
리턴 int

ZipInputStream() 공개 메소드

Creates a new Zip input stream, for reading a zip archive.
public ZipInputStream ( Stream baseInputStream ) : System
baseInputStream Stream The underlying providing data.
리턴 System

ZipInputStream() 공개 메소드

Creates a new Zip input stream, for reading a zip archive.
public ZipInputStream ( Stream baseInputStream, int bufferSize ) : System
baseInputStream Stream The underlying providing data.
bufferSize int Size of the buffer.
리턴 System