C# Class Universe.Framework.Serialization.TarArchiveReader

Temporary code to do the bare minimum required to read a tar archive for our purposes
Datei anzeigen Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Protected Properties

Property Type Description
m_asciiEncoding System.Text.ASCIIEncoding
m_br System.IO.BinaryReader
m_nullCharArray char[]
m_spaceCharArray char[]

Public Methods

Method Description
Close ( ) : void
ConvertOctalBytesToDecimal ( byte bytes, int startIndex, int count ) : int

Convert octal bytes to a decimal representation

ReadEntry ( string &filePath, TarEntryType &entryType ) : byte[]

Read the next entry in the tar file.

TarArchiveReader ( Stream s ) : System.IO

Generate a tar reader which reads from the given stream.

Protected Methods

Method Description
ReadData ( int fileSize ) : byte[]

Read data following a header

ReadHeader ( ) : TarHeader

Read the next 512 byte chunk of data as a tar header.

Method Details

Close() public method

public Close ( ) : void
return void

ConvertOctalBytesToDecimal() public static method

Convert octal bytes to a decimal representation
public static ConvertOctalBytesToDecimal ( byte bytes, int startIndex, int count ) : int
bytes byte
startIndex int
count int
return int

ReadData() protected method

Read data following a header
protected ReadData ( int fileSize ) : byte[]
fileSize int
return byte[]

ReadEntry() public method

Read the next entry in the tar file.
public ReadEntry ( string &filePath, TarEntryType &entryType ) : byte[]
filePath string
entryType TarEntryType
return byte[]

ReadHeader() protected method

Read the next 512 byte chunk of data as a tar header.
protected ReadHeader ( ) : TarHeader
return TarHeader

TarArchiveReader() public method

Generate a tar reader which reads from the given stream.
public TarArchiveReader ( Stream s ) : System.IO
s Stream
return System.IO

Property Details

m_asciiEncoding protected_oe static_oe property

protected static ASCIIEncoding,System.Text m_asciiEncoding
return System.Text.ASCIIEncoding

m_br protected_oe property

Binary reader for the underlying stream
protected BinaryReader,System.IO m_br
return System.IO.BinaryReader

m_nullCharArray protected_oe static_oe property

Used to trim off null chars
protected static char[] m_nullCharArray
return char[]

m_spaceCharArray protected_oe static_oe property

Used to trim off space chars
protected static char[] m_spaceCharArray
return char[]