프로퍼티 | 타입 | 설명 | |
---|---|---|---|
assemblyBuffer | byte[] | ||
blockBuffer | byte[] | ||
buffer | |||
currSize | long | ||
outputStream | Stream |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
GetRecordSize | int |
메소드 | 설명 | |
---|---|---|
CloseEntry ( ) : void |
Close an entry. This method MUST be called for all file entries that contain data. The reason is that we must buffer data written to the stream in order to satisfy the buffer's block based writes. Thus, there may be data fragments still being assembled that must be written to the output stream before this entry is closed and the next entry written.
|
|
Finish ( ) : void |
Ends the TAR archive without closing the underlying OutputStream. The result is that the EOF block of nulls is written.
|
|
Flush ( ) : void |
All buffered data is written to destination
|
|
PutNextEntry ( |
Put an entry on the output stream. This writes the entry's header and positions the output stream for writing the contents of the entry. Once this method is called, the stream is ready for calls to write() to write the entry's contents. Once the contents are written, closeEntry() MUST be called to ensure that all buffered data is completely written to the output stream.
|
|
Read ( byte buffer, int offset, int count ) : int |
read bytes from the current stream and advance the position within the stream by the number of bytes read.
|
|
ReadByte ( ) : int |
Read a byte from the stream and advance the position within the stream by one byte or returns -1 if at the end of the stream.
|
|
Seek ( long offset, SeekOrigin origin ) : long |
set the position within the current stream
|
|
SetLength ( long value ) : void |
Set the length of the current stream
|
|
TarOutputStream ( Stream outputStream ) : System |
Construct TarOutputStream using default block factor
|
|
TarOutputStream ( Stream outputStream, int blockFactor ) : System |
Construct TarOutputStream with user specified block factor
|
|
Write ( byte buffer, int offset, int count ) : void |
Writes bytes to the current tar archive entry. This method is aware of the current entry and will throw an exception if you attempt to write bytes past the length specified for the current entry. The method is also (painfully) aware of the record buffering required by TarBuffer, and manages buffers that are not a multiple of recordsize in length, including assembling records from small buffers.
|
|
WriteByte ( byte value ) : void |
Writes a byte to the current tar archive entry. This method simply calls Write(byte[], int, int).
|
메소드 | 설명 | |
---|---|---|
Dispose ( bool disposing ) : void |
Ends the TAR archive and closes the underlying OutputStream. This means that Finish() is called followed by calling the TarBuffer's Close(). |
|
WriteEofBlock ( ) : void |
Write an EOF (end of archive) block to the tar archive. An EOF block consists of all zeros.
|
메소드 | 설명 | |
---|---|---|
GetRecordSize ( ) : int |
public PutNextEntry ( |
||
entry | /// The TarEntry to be written to the archive. /// | |
리턴 | void |
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | The buffer to store read bytes in. |
offset | int | The index into the buffer to being storing bytes at. |
count | int | The desired number of bytes to read. |
리턴 | int |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | The offset relative to the |
origin | SeekOrigin | The |
리턴 | long |
public TarOutputStream ( Stream outputStream ) : System | ||
outputStream | Stream | stream to write to |
리턴 | System |
public TarOutputStream ( Stream outputStream, int blockFactor ) : System | ||
outputStream | Stream | stream to write to |
blockFactor | int | blocking factor |
리턴 | System |
public Write ( byte buffer, int offset, int count ) : void | ||
buffer | byte | /// The buffer to write to the archive. /// |
offset | int | /// The offset in the buffer from which to get bytes. /// |
count | int | /// The number of bytes to write. /// |
리턴 | void |
public WriteByte ( byte value ) : void | ||
value | byte | /// The byte to be written. /// |
리턴 | void |