def __len__(self):
self._lock.acquire()<EOL>try:<EOL><INDENT>return len(self._buffer)<EOL><DEDENT>finally:<EOL><INDENT>self._lock.release()<EOL><DEDENT>
Return the number of bytes buffered.

@return: number of bytes bufferes
@rtype: int