| | |
| | | public LDIFWriter(LDIFExportConfig exportConfig) |
| | | throws IOException |
| | | { |
| | | |
| | | ensureNotNull(exportConfig); |
| | | this.exportConfig = exportConfig; |
| | | |
| | |
| | | public void writeComment(String comment, int wrapColumn) |
| | | throws IOException |
| | | { |
| | | |
| | | ensureNotNull(comment); |
| | | |
| | | |
| | |
| | | public boolean writeEntry(Entry entry) |
| | | throws IOException, LDIFException |
| | | { |
| | | |
| | | ensureNotNull(entry); |
| | | return entry.toLDIF(exportConfig); |
| | | } |
| | |
| | | public void writeAddChangeRecord(Entry entry) |
| | | throws IOException |
| | | { |
| | | |
| | | ensureNotNull(entry); |
| | | |
| | | |
| | |
| | | public void writeDeleteChangeRecord(Entry entry, boolean commentEntry) |
| | | throws IOException |
| | | { |
| | | |
| | | ensureNotNull(entry); |
| | | |
| | | // Get the information necessary to write the LDIF. |
| | |
| | | public void writeModifyChangeRecord(DN dn, List<Modification> modifications) |
| | | throws IOException |
| | | { |
| | | |
| | | ensureNotNull(dn, modifications); |
| | | |
| | | // If there aren't any modifications, then there's nothing to do. |
| | |
| | | DN newSuperior) |
| | | throws IOException |
| | | { |
| | | |
| | | ensureNotNull(dn, newRDN); |
| | | |
| | | |
| | |
| | | public void flush() |
| | | throws IOException |
| | | { |
| | | |
| | | writer.flush(); |
| | | } |
| | | |
| | |
| | | public void close() |
| | | throws IOException |
| | | { |
| | | |
| | | writer.flush(); |
| | | writer.close(); |
| | | } |
| | |
| | | public static void appendLDIFSeparatorAndValue(StringBuilder buffer, |
| | | byte[] valueBytes) |
| | | { |
| | | |
| | | ensureNotNull(buffer, valueBytes); |
| | | |
| | | |
| | |
| | | boolean wrapLines, int wrapColumn) |
| | | throws IOException |
| | | { |
| | | |
| | | ensureNotNull(line, writer); |
| | | |
| | | int length = line.length(); |