'Potentially cheaper than getvalue as no string concatenation
needs to happen.'

def copyto(self, target):

    for child in self.prepended_children:
        child.copyto(target)
    stream_content = self.stream.getvalue()
    if stream_content:
        target.write(stream_content)
