Method | Description | |
---|---|---|
Close ( ) : void |
Close the TarBuffer. If this is an output buffer, also flush the current block before closing.
|
|
CreateInputTarBuffer ( Stream inputStream ) : |
Create TarBuffer for reading with default BlockFactor
|
|
CreateInputTarBuffer ( Stream inputStream, int blockFactor ) : |
Construct TarBuffer for reading inputStream setting BlockFactor
|
|
CreateOutputTarBuffer ( Stream outputStream ) : |
Construct TarBuffer for writing with default BlockFactor
|
|
CreateOutputTarBuffer ( Stream outputStream, int blockFactor ) : |
Construct TarBuffer for writing Tar output to streams.
|
|
Initialize ( int archiveBlockFactor ) : void |
Initialization common to all constructors.
|
|
IsEndOfArchiveBlock ( byte block ) : bool |
Determine if an archive block indicates the End of an Archive has been reached. End of archive is indicated by a block that consists entirely of null bytes. All remaining blocks for the record should also be null's However some older tars only do a couple of null blocks (Old GNU tar for one) and also partial records
|
|
ReadBlock ( ) : byte[] |
Read a block from the input stream.
|
|
SkipBlock ( ) : void |
Skip over a block on the input stream.
|
|
WriteBlock ( byte block ) : void |
Write a block of data to the archive.
|
|
WriteBlock ( byte buffer, int offset ) : void |
Write an archive record to the archive, where the record may be inside of a larger array buffer. The buffer must be "offset plus record size" long.
|
|
WriteFinalRecord ( ) : void |
WriteFinalRecord writes the current record buffer to output any unwritten data is present. Any trailing bytes are set to zero which is by definition correct behaviour for the end of a tar stream. |
|
WriteRecord ( ) : void |
Write a TarBuffer record to the archive.
|
Method | Description | |
---|---|---|
TarBuffer ( ) : System |
Construct a default TarBuffer
|
Method | Description | |
---|---|---|
GetBlockFactor ( ) : int | ||
GetCurrentBlockNum ( ) : int | ||
GetCurrentRecordNum ( ) : int | ||
GetRecordSize ( ) : int | ||
IsEOFBlock ( byte block ) : bool | ||
ReadRecord ( ) : bool |
Read a record from data stream.
|
public static CreateInputTarBuffer ( Stream inputStream ) : |
||
inputStream | Stream | Stream to buffer |
return |
public static CreateInputTarBuffer ( Stream inputStream, int blockFactor ) : |
||
inputStream | Stream | Stream to buffer |
blockFactor | int | Blocking factor to apply |
return |
public static CreateOutputTarBuffer ( Stream outputStream ) : |
||
outputStream | Stream | output stream for buffer |
return |
public static CreateOutputTarBuffer ( Stream outputStream, int blockFactor ) : |
||
outputStream | Stream | Output stream to write to. |
blockFactor | int | Blocking factor to apply |
return |
public Initialize ( int archiveBlockFactor ) : void | ||
archiveBlockFactor | int | |
return | void |
public static IsEndOfArchiveBlock ( byte block ) : bool | ||
block | byte | The data block to check. |
return | bool |
public WriteBlock ( byte block ) : void | ||
block | byte | /// The data to write to the archive. /// |
return | void |
public WriteBlock ( byte buffer, int offset ) : void | ||
buffer | byte | /// The buffer containing the record data to write. /// |
offset | int | /// The offset of the record data within buffer. /// |
return | void |