Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.support.tarfile._StreamProxy Class Reference

List of all members.

Public Member Functions

def __init__
def read
def getcomptype
def close

Public Attributes

 fileobj
 buf
 read

Detailed Description

Small proxy class that enables transparent compression
   detection for the Stream interface (mode 'r|*').

Definition at line 554 of file tarfile.py.


Constructor & Destructor Documentation

def MoinMoin.support.tarfile._StreamProxy.__init__ (   self,
  fileobj 
)

Definition at line 559 of file tarfile.py.

00559 
00560     def __init__(self, fileobj):
00561         self.fileobj = fileobj
00562         self.buf = self.fileobj.read(BLOCKSIZE)


Member Function Documentation

Definition at line 574 of file tarfile.py.

00574 
00575     def close(self):
00576         self.fileobj.close()
00577 # class StreamProxy

Here is the caller graph for this function:

Definition at line 567 of file tarfile.py.

00567 
00568     def getcomptype(self):
00569         if self.buf.startswith("\037\213\010"):
00570             return "gz"
00571         if self.buf.startswith("BZh91"):
00572             return "bz2"
00573         return "tar"

def MoinMoin.support.tarfile._StreamProxy.read (   self,
  size 
)

Definition at line 563 of file tarfile.py.

00563 
00564     def read(self, size):
00565         self.read = self.fileobj.read
00566         return self.buf

Here is the caller graph for this function:


Member Data Documentation

Definition at line 561 of file tarfile.py.

Definition at line 560 of file tarfile.py.

Definition at line 564 of file tarfile.py.


The documentation for this class was generated from the following file: