Package svnmailer :: Module stream :: Class SplittingStream
[show private | hide private]
[frames | no frames]

Class SplittingStream

 object --+    
          |    
_BaseStream --+
              |
             SplittingStream


Stream wrapper, which provides the ability to split the stream
Method Summary
  __init__(self, tempdir)
Initialization
  close(self)
Closes the stream and removes all tempfiles
str getPart(self, idx)
Returns the value of part idx
int getPartCount(self)
Returns the number of splitted parts
  split(self)
Splits the stream
  write(self, towrite)
Writes to the current stream and counts the number of bytes
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...

Instance Variable Summary
int current: The current byte counter

Method Details

__init__(self, tempdir=None)
(Constructor)

Initialization
Parameters:
tempdir - specific temporary directory
           (type=str)
Overrides:
svnmailer.stream._BaseStream.__init__

close(self)

Closes the stream and removes all tempfiles
Overrides:
svnmailer.stream._BaseStream.close

getPart(self, idx)

Returns the value of part idx
Parameters:
idx - The part number
           (type=int)
Returns:
The content of the particular part
           (type=str)

getPartCount(self)

Returns the number of splitted parts
Returns:
The number
           (type=int)

split(self)

Splits the stream

This dumps the current content into a tempfile clears the old stream.

write(self, towrite)

Writes to the current stream and counts the number of bytes
Overrides:
svnmailer.stream._BaseStream.write

Instance Variable Details

current

The current byte counter
Type:
int

Generated by Epydoc 2.0 on Sun Sep 25 20:49:11 2005 http://epydoc.sf.net