Package org.ldaptive.io
Class LdifWriter
java.lang.Object
org.ldaptive.io.LdifWriter
- All Implemented Interfaces:
SearchResultWriter
Writes a
SearchResponse
as LDIF to a Writer
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
createLdif
(SearchResponse result) Creates an LDIF using the supplied search result.protected String
createLdifEntry
(LdapEntry entry) Creates an LDIF using the supplied ldap entry.protected String
Creates an LDIF using the supplied search reference.void
write
(SearchResponse result) Writes the supplied search result to the writer.
-
Field Details
-
LINE_SEPARATOR
Line separator. -
ldifWriter
Writer to write to.
-
-
Constructor Details
-
LdifWriter
Creates a new ldif writer.- Parameters:
writer
- to write LDIF to
-
-
Method Details
-
write
Writes the supplied search result to the writer.- Specified by:
write
in interfaceSearchResultWriter
- Parameters:
result
- search result to write- Throws:
IOException
- if an error occurs using the writer
-
createLdif
Creates an LDIF using the supplied search result.- Parameters:
result
- search result- Returns:
- LDIF
-
createLdifEntry
Creates an LDIF using the supplied ldap entry.- Parameters:
entry
- ldap entry- Returns:
- LDIF
-
createSearchReference
Creates an LDIF using the supplied search reference.- Parameters:
ref
- search reference- Returns:
- LDIF
-