'Initialize a StreamResultHandler
Parameters:
l
LDAPObject instance
writer_obj
Either a file-like object or a ldif.LDIFWriter instance
used for output'

def __init__(self, l, writer_obj, headerStr='', footerStr=''):

    import ldif
    if isinstance(writer_obj, ldif.LDIFWriter):
        self._ldif_writer = writer_obj
    else:
        self._ldif_writer = ldif.LDIFWriter(writer_obj)
    FileWriter.__init__(self, l, self._ldif_writer._output_file, headerStr, footerStr)
