'Write `data\' to the FIFO buffer.
If necessary, a new internal buffer is created.'

def write(self, data):

    if (not self.buffers):
        self.buffers.append(StringIO())
        self.write_pos = 0
    lastBuf = self.buffers[(-1)]
    lastBuf.seek(self.write_pos)
    lastBuf.write(data)
    if (lastBuf.tell() >= self.max_size):
        lastBuf = StringIO()
        self.buffers.append(lastBuf)
    self.write_pos = lastBuf.tell()
