From debf9356e93bc9df5a3de320b44360890d798660 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 10 Apr 2007 16:49:00 +0000
Subject: [PATCH] Add an Entry.toLDIFString() method for convenience purposes.
---
opends/src/server/org/opends/server/types/Entry.java | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/types/Entry.java b/opends/src/server/org/opends/server/types/Entry.java
index edf86a8..135b0e1 100644
--- a/opends/src/server/org/opends/server/types/Entry.java
+++ b/opends/src/server/org/opends/server/types/Entry.java
@@ -4917,6 +4917,26 @@
/**
+ * Retrieves a string representation of this entry in LDIF form.
+ *
+ * @return A string representation of this entry in LDIF form.
+ */
+ public String toLDIFString()
+ {
+ StringBuilder buffer = new StringBuilder();
+
+ for (StringBuilder ldifLine : toLDIF())
+ {
+ buffer.append(ldifLine);
+ buffer.append(EOL);
+ }
+
+ return buffer.toString();
+ }
+
+
+
+ /**
* Retrieves a one-line representation of this entry.
*
* @return A one-line representation of this entry.
--
Gitblit v1.10.0