C# Class ESRI.ArcGIS.Client.Toolkit.DataSources.Kml.Zip.ZipEntry

Represents a single entry in a ZipFile. Typically, applications get a ZipEntry by enumerating the entries within a ZipFile, or by adding an entry to a ZipFile.
ファイルを表示 Open project: Esri/arcgis-toolkit-sl-wpf Class Usage Examples

Private Properties

Property Type Description
ConsExtraField byte[]
FileNameIsUtf8 bool
GenerateCommentBytes System.Text.Encoding
HandlePK00Prefix void
HandleUnexpectedDataDescriptor void
InternalExtract void
IsNotValidSig bool
IsNotValidZipDirEntrySig bool
MarkAsDirectory void
ProcessExtraField int
Read ZipEntry
ReadHeader bool
ReadWeakEncryptionHeader int
ResetDirEntry void
SetFdpLoh void
ValidateCompression void
ValidateEncryption void
ValidateOutput bool
ZipEntry System
_CheckRead void
_ExtractOne System.Int32
_GetEncodedFileNameBytes byte[]

Public Methods

Method Description
Extract ( System stream ) : void

Extracts the entry to the specified stream.

For example, the caller could specify Console.Out, or a MemoryStream.

ReadDirEntry ( System s, System expectedEncoding ) : ZipEntry

Reads one entry from the zip directory structure in the zip file.

Private Methods

Method Description
ConsExtraField ( ) : byte[]
FileNameIsUtf8 ( char FileNameChars ) : bool
GenerateCommentBytes ( ) : System.Text.Encoding
HandlePK00Prefix ( Stream s ) : void
HandleUnexpectedDataDescriptor ( ZipEntry entry ) : void
InternalExtract ( System output ) : void
IsNotValidSig ( int signature ) : bool
IsNotValidZipDirEntrySig ( int signature ) : bool

Returns true if the passed-in value is a valid signature for a ZipDirEntry.

MarkAsDirectory ( ) : void
ProcessExtraField ( Int16 extraFieldLength ) : int
Read ( ZipFile zf, bool first ) : ZipEntry

Reads one ZipEntry from the given stream. If the entry is encrypted, we don't decrypt at this point. We also do not decompress. Mostly we read metadata.

ReadHeader ( ZipEntry ze, System defaultEncoding ) : bool
ReadWeakEncryptionHeader ( Stream s, byte buffer ) : int
ResetDirEntry ( ) : void
SetFdpLoh ( ) : void
ValidateCompression ( ) : void
ValidateEncryption ( ) : void
ValidateOutput ( Stream outstream ) : bool
ZipEntry ( ) : System
_CheckRead ( int nbytes ) : void
_ExtractOne ( System output ) : Int32
_GetEncodedFileNameBytes ( ) : byte[]

Method Details

Extract() public method

Extracts the entry to the specified stream.

For example, the caller could specify Console.Out, or a MemoryStream.

public Extract ( System stream ) : void
stream System the stream to which the entry should be extracted.
return void

ReadDirEntry() public static method

Reads one entry from the zip directory structure in the zip file.
public static ReadDirEntry ( System s, System expectedEncoding ) : ZipEntry
s System the stream from which to read.
expectedEncoding System /// The text encoding to use if the entry is not marked UTF-8. ///
return ZipEntry