C# 클래스 ICSharpCode.SharpZipLib.Tar.TarHeader

This class encapsulates the Tar Entry Header used in Tar Archives. The class also holds a number of tar constants, used mostly in headers.
상속: ICloneable
파일 보기 프로젝트 열기: icsharpcode/SharpZipLib 1 사용 예제들

공개 메소드들

메소드 설명
Clone ( ) : object

Create a new TarHeader that is a copy of the current instance.

Equals ( object obj ) : bool

Determines if this instance is equal to the specified object.

GetAsciiBytes ( string toAdd, int nameOffset, byte buffer, int bufferOffset, int length ) : int

Add a string to a buffer as a collection of ascii bytes.

GetHashCode ( ) : int

Get a hash code for the current object.

GetNameBytes ( StringBuilder name, byte buffer, int offset, int length ) : int

Add an entry name to the buffer

GetNameBytes ( StringBuilder name, int nameOffset, byte buffer, int bufferOffset, int length ) : int

Add name to the buffer as a collection of bytes

GetNameBytes ( string name, byte buffer, int offset, int length ) : int

Add an entry name to the buffer

GetNameBytes ( string name, int nameOffset, byte buffer, int bufferOffset, int length ) : int

Add name to the buffer as a collection of bytes

GetOctalBytes ( long value, byte buffer, int offset, int length ) : int

Put an octal representation of a value into a buffer

ParseBuffer ( byte header ) : void

Parse TarHeader information from a header buffer.

ParseName ( byte header, int offset, int length ) : StringBuilder

Parse a name from a header buffer.

ParseOctal ( byte header, int offset, int length ) : long

Parse an octal string from a header buffer.

TarHeader ( ) : System

Initialise a default TarHeader instance

WriteHeader ( byte outBuffer ) : void

'Write' header information to buffer provided, updating the check sum.

비공개 메소드들

메소드 설명
ComputeCheckSum ( byte buffer ) : int

Compute the checksum for a tar entry header. The checksum field must be all spaces prior to this happening

GetBinaryOrOctalBytes ( long value, byte buffer, int offset, int length ) : int

Put an octal or binary representation of a value into a buffer

GetCTime ( System.DateTime dateTime ) : int
GetCheckSumOctalBytes ( long value, byte buffer, int offset, int length ) : void

Add the checksum integer to header buffer.

GetDateTimeFromCTime ( long ticks ) : System.DateTime
GetName ( ) : string
MakeCheckSum ( byte buffer ) : int

Make a checksum for a tar entry ignoring the checksum contents.

ParseBinaryOrOctal ( byte header, int offset, int length ) : long
RestoreSetValues ( ) : void
SetValueDefaults ( int userId, string userName, int groupId, string groupName ) : void

Set defaults for values used when constructing a TarHeader instance.

메소드 상세

Clone() 공개 메소드

Create a new TarHeader that is a copy of the current instance.
public Clone ( ) : object
리턴 object

Equals() 공개 메소드

Determines if this instance is equal to the specified object.
public Equals ( object obj ) : bool
obj object The object to compare with.
리턴 bool

GetAsciiBytes() 공개 정적인 메소드

Add a string to a buffer as a collection of ascii bytes.
public static GetAsciiBytes ( string toAdd, int nameOffset, byte buffer, int bufferOffset, int length ) : int
toAdd string The string to add
nameOffset int The offset of the first character to add.
buffer byte The buffer to add to.
bufferOffset int The offset to start adding at.
length int The number of ascii characters to add.
리턴 int

GetHashCode() 공개 메소드

Get a hash code for the current object.
public GetHashCode ( ) : int
리턴 int

GetNameBytes() 공개 정적인 메소드

Add an entry name to the buffer
public static GetNameBytes ( StringBuilder name, byte buffer, int offset, int length ) : int
name StringBuilder /// The name to add ///
buffer byte /// The buffer to add to ///
offset int /// The offset into the buffer from which to start adding ///
length int /// The number of header bytes to add ///
리턴 int

GetNameBytes() 공개 정적인 메소드

Add name to the buffer as a collection of bytes
public static GetNameBytes ( StringBuilder name, int nameOffset, byte buffer, int bufferOffset, int length ) : int
name StringBuilder The name to add
nameOffset int The offset of the first character
buffer byte The buffer to add to
bufferOffset int The index of the first byte to add
length int The number of characters/bytes to add
리턴 int

GetNameBytes() 공개 정적인 메소드

Add an entry name to the buffer
public static GetNameBytes ( string name, byte buffer, int offset, int length ) : int
name string The name to add
buffer byte The buffer to add to
offset int The offset into the buffer from which to start adding
length int The number of header bytes to add
리턴 int

GetNameBytes() 공개 정적인 메소드

Add name to the buffer as a collection of bytes
public static GetNameBytes ( string name, int nameOffset, byte buffer, int bufferOffset, int length ) : int
name string The name to add
nameOffset int The offset of the first character
buffer byte The buffer to add to
bufferOffset int The index of the first byte to add
length int The number of characters/bytes to add
리턴 int

GetOctalBytes() 공개 정적인 메소드

Put an octal representation of a value into a buffer
public static GetOctalBytes ( long value, byte buffer, int offset, int length ) : int
value long /// the value to be converted to octal ///
buffer byte /// buffer to store the octal string ///
offset int /// The offset into the buffer where the value starts ///
length int /// The length of the octal string to create ///
리턴 int

ParseBuffer() 공개 메소드

Parse TarHeader information from a header buffer.
public ParseBuffer ( byte header ) : void
header byte /// The tar entry header buffer to get information from. ///
리턴 void

ParseName() 공개 정적인 메소드

Parse a name from a header buffer.
public static ParseName ( byte header, int offset, int length ) : StringBuilder
header byte /// The header buffer from which to parse. ///
offset int /// The offset into the buffer from which to parse. ///
length int /// The number of header bytes to parse. ///
리턴 StringBuilder

ParseOctal() 공개 정적인 메소드

Parse an octal string from a header buffer.
public static ParseOctal ( byte header, int offset, int length ) : long
header byte The header buffer from which to parse.
offset int The offset into the buffer from which to parse.
length int The number of header bytes to parse.
리턴 long

TarHeader() 공개 메소드

Initialise a default TarHeader instance
public TarHeader ( ) : System
리턴 System

WriteHeader() 공개 메소드

'Write' header information to buffer provided, updating the check sum.
public WriteHeader ( byte outBuffer ) : void
outBuffer byte output buffer for header information
리턴 void