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 StringcreateLdif(SearchResponse result) Creates an LDIF using the supplied search result.protected StringcreateLdifEntry(LdapEntry entry) Creates an LDIF using the supplied ldap entry.protected StringCreates an LDIF using the supplied search reference.voidwrite(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:
writein 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
-