From d93627ee43ca3e694a7c4275d63c0571c4ec83dd Mon Sep 17 00:00:00 2001
From: mmarie <mmarie@localhost>
Date: Thu, 18 Dec 2008 09:35:55 +0000
Subject: [PATCH] issue 3640 : Refactor Replication code to make it more generic

---
 opends/src/server/org/opends/server/replication/service/ReplInputStream.java |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/service/ReplInputStream.java b/opends/src/server/org/opends/server/replication/service/ReplInputStream.java
index 7e0bd4b..e3c86d8 100644
--- a/opends/src/server/org/opends/server/replication/service/ReplInputStream.java
+++ b/opends/src/server/org/opends/server/replication/service/ReplInputStream.java
@@ -146,11 +146,18 @@
    *                       use by this input stream.
    */
   public int read()
-         throws IOException
+          throws IOException
   {
-    // This method is not supposed to be called to make an LDIF import
-    // for replication.
-    throw new IOException("Not implemented");
+    if (closed) {
+      return -1;
+    }
+
+    byte[] b = new byte[1];
+    
+    if (read(b, 0, 1) == 0) {
+      throw new IOException();
+    }
+
+    return ((int)b[0]);
   }
 }
-

--
Gitblit v1.10.0