Class that serves as an adapter between TarFile and a stream-like
object. The stream-like object only needs to have a read() or write()
method and is accessed blockwise. Use of gzip or bzip2 compression is
possible. A stream-like object could be for example: sys.stdin,
sys.stdout, a socket, a tape device etc.
_Stream is intended to be used only internally.
|
__init__(self,
name,
mode,
comptype,
fileobj,
bufsize)
Construct a _Stream object. |
|
|
|
|
|
_init_write_gz(self)
Initialize for writing with gzip compression. |
|
|
|
write(self,
s)
Write string s to the stream. |
|
|
|
__write(self,
s)
Write string s to the stream if a whole new block is ready to be
written. |
|
|
|
close(self)
Close the _Stream object. |
|
|
|
_init_read_gz(self)
Initialize for reading a gzip compressed fileobj. |
|
|
|
tell(self)
Return the stream's file pointer position. |
|
|
|
seek(self,
pos=0)
Set the stream's file pointer to pos. |
|
|
|
read(self,
size=None)
Return the next size number of bytes from the stream. |
|
|
|
_read(self,
size)
Return size bytes from the stream. |
|
|
|
__read(self,
size)
Return size bytes from stream. |
|
|
|
|
|
_Stream__write(self,
s)
Write string s to the stream if a whole new block is ready to be
written. |
|
|