Package gavo :: Package votable :: Module tableparser :: Class _StreamData
[hide private]
[frames] | no frames]

Class _StreamData

source code

object --+
         |
        _StreamData

A stand-in for a file that decodes VOTable stream data on an as-needed basis.

Instance Methods [hide private]
 
__init__(self, nodeIterator)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_setEOF(self)
cleans up at end of stream and sets eof flag.
source code
 
_fillBuffer(self, nBytes)
obtains events from node iterator fo fill curChunk.
source code
 
_decodeBase64(self, input)
decodes input and sets curChunk, leftover, and fPos accordingly.
source code
 
read(self, nBytes)
returns a string containing the next nBytes of the input stream.
source code
 
atEnd(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  minChunk = 20000
  lastRes = None
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, nodeIterator)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

_setEOF(self)

source code 

cleans up at end of stream and sets eof flag.

This is called by _fillBuffer exclusively.

_decodeBase64(self, input)

source code 

decodes input and sets curChunk, leftover, and fPos accordingly.

The method behaves slightly differently when the _eof attribute is true -- normally, it will leave anything after the last line feed alone, but at _eof, it will decode even that.

It is an error to pass in anything that has no line break unless at _eof.

read(self, nBytes)

source code 

returns a string containing the next nBytes of the input stream.

The function raises an IOError if there's not enough data left.