Back to index

enigmail  1.4.3
Public Member Functions | Private Attributes
JarMaker.ZipEntry Class Reference

List of all members.

Public Member Functions

def __init__
def write
def close

Private Attributes

 _zipfile
 _name
 _inner

Detailed Description

Helper class for jar output.

This class defines a simple file-like object for a zipfile.ZipEntry
so that we can consecutively write to it and then close it.
This methods hooks into ZipFile.writestr on close().

Definition at line 65 of file JarMaker.py.


Constructor & Destructor Documentation

def JarMaker.ZipEntry.__init__ (   self,
  name,
  zipfile 
)

Definition at line 72 of file JarMaker.py.

00072 
00073   def __init__(self, name, zipfile):
00074     self._zipfile = zipfile
00075     self._name = name
00076     self._inner = StringIO()


Member Function Documentation

def JarMaker.ZipEntry.close (   self)

Definition at line 82 of file JarMaker.py.

00082 
00083   def close(self):
00084     'The close method writes the content back to the zip file.'
00085     self._zipfile.writestr(self._name, self._inner.getvalue())

def JarMaker.ZipEntry.write (   self,
  content 
)

Definition at line 77 of file JarMaker.py.

00077 
00078   def write(self, content):
00079     'Append the given content to this zip entry'
00080     self._inner.write(content)
00081     return

Here is the caller graph for this function:


Member Data Documentation

Definition at line 75 of file JarMaker.py.

Definition at line 74 of file JarMaker.py.

Definition at line 73 of file JarMaker.py.


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