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

A class to handle the extra data field for Zip entries
Extra data contains 0 or more values each prefixed by a header tag and length. They contain zero or more bytes of actual data. The data is held internally using a copy on write strategy. This is more efficient but means that for extra data created by passing in data can have the values modified by the caller in some circumstances.
상속: IDisposable
파일 보기 프로젝트 열기: fanfeilong/exceltk 1 사용 예제들

공개 메소드들

메소드 설명
AddData ( byte data ) : void

Add a byte of data to the pending new entry.

AddEntry ( ITaggedData taggedData ) : void

Add a new entry to extra data.

AddEntry ( int headerID, byte fieldData ) : void

Add a new entry to extra data

If the ID already exists its contents are replaced.

AddLeInt ( int toAdd ) : void

Add an integer value in little endian order to the pending new entry.

AddLeLong ( long toAdd ) : void

Add a long value in little endian order to the pending new entry.

AddLeShort ( int toAdd ) : void

Add a short value in little endian order to the pending new entry.

AddNewEntry ( int headerID ) : void

Add entry data added since StartNewEntry using the ID passed.

Clear ( ) : void

Clear the stored data.

Delete ( int headerID ) : bool

Delete an extra data field.

Dispose ( ) : void

Dispose of this instance.

Find ( int headerID ) : bool

Find an extra data value

GetEntryData ( ) : byte[]

Get the raw extra data value

GetStreamForTag ( int tag ) : Stream

Get a read-only Stream for the associated tag.

ReadByte ( ) : int

Read a byte from an extra data

ReadInt ( ) : int

Read an integer in little endian form from the last found data value.

ReadLong ( ) : long

Read a long in little endian form from the last found data value

ReadShort ( ) : int

Read a short value in little endian form from the last found data value.

Skip ( int amount ) : void

Skip data during reading.

StartNewEntry ( ) : void

Start adding a new entry.

Add data using AddData(byte[]), AddLeShort, AddLeInt, or AddLeLong. The new entry is completed and actually added by calling AddNewEntry

ZipExtraData ( ) : System

Initialise a default instance.

ZipExtraData ( byte data ) : System

Initialise with known extra data.

비공개 메소드들

메소드 설명
Create ( short tag, byte data, int offset, int count ) : ITaggedData
GetData ( short tag ) : ITaggedData

Get the tagged data for a tag.

ReadCheck ( int length ) : void
ReadShortInternal ( ) : int

Internal form of ReadShort that reads data at any location.

SetShort ( int &index, int source ) : void

메소드 상세

AddData() 공개 메소드

Add a byte of data to the pending new entry.
public AddData ( byte data ) : void
data byte The byte to add.
리턴 void

AddEntry() 공개 메소드

Add a new entry to extra data.
public AddEntry ( ITaggedData taggedData ) : void
taggedData ITaggedData The value to add.
리턴 void

AddEntry() 공개 메소드

Add a new entry to extra data
If the ID already exists its contents are replaced.
public AddEntry ( int headerID, byte fieldData ) : void
headerID int The ID for this entry.
fieldData byte The data to add.
리턴 void

AddLeInt() 공개 메소드

Add an integer value in little endian order to the pending new entry.
public AddLeInt ( int toAdd ) : void
toAdd int The data to add.
리턴 void

AddLeLong() 공개 메소드

Add a long value in little endian order to the pending new entry.
public AddLeLong ( long toAdd ) : void
toAdd long The data to add.
리턴 void

AddLeShort() 공개 메소드

Add a short value in little endian order to the pending new entry.
public AddLeShort ( int toAdd ) : void
toAdd int The data to add.
리턴 void

AddNewEntry() 공개 메소드

Add entry data added since StartNewEntry using the ID passed.
public AddNewEntry ( int headerID ) : void
headerID int The identifier to use for this entry.
리턴 void

Clear() 공개 메소드

Clear the stored data.
public Clear ( ) : void
리턴 void

Delete() 공개 메소드

Delete an extra data field.
public Delete ( int headerID ) : bool
headerID int The identifier of the field to delete.
리턴 bool

Dispose() 공개 메소드

Dispose of this instance.
public Dispose ( ) : void
리턴 void

Find() 공개 메소드

Find an extra data value
public Find ( int headerID ) : bool
headerID int The identifier for the value to find.
리턴 bool

GetEntryData() 공개 메소드

Get the raw extra data value
public GetEntryData ( ) : byte[]
리턴 byte[]

GetStreamForTag() 공개 메소드

Get a read-only Stream for the associated tag.
public GetStreamForTag ( int tag ) : Stream
tag int The tag to locate data for.
리턴 Stream

ReadByte() 공개 메소드

Read a byte from an extra data
public ReadByte ( ) : int
리턴 int

ReadInt() 공개 메소드

Read an integer in little endian form from the last found data value.
public ReadInt ( ) : int
리턴 int

ReadLong() 공개 메소드

Read a long in little endian form from the last found data value
public ReadLong ( ) : long
리턴 long

ReadShort() 공개 메소드

Read a short value in little endian form from the last found data value.
public ReadShort ( ) : int
리턴 int

Skip() 공개 메소드

Skip data during reading.
public Skip ( int amount ) : void
amount int The number of bytes to skip.
리턴 void

StartNewEntry() 공개 메소드

Start adding a new entry.
Add data using AddData(byte[]), AddLeShort, AddLeInt, or AddLeLong. The new entry is completed and actually added by calling AddNewEntry
public StartNewEntry ( ) : void
리턴 void

ZipExtraData() 공개 메소드

Initialise a default instance.
public ZipExtraData ( ) : System
리턴 System

ZipExtraData() 공개 메소드

Initialise with known extra data.
public ZipExtraData ( byte data ) : System
data byte The extra data.
리턴 System