From 7bfe3bcd12a750f6b1e7327158a012f8fb919ddf Mon Sep 17 00:00:00 2001
From: Steffen Friedrich <friedrich@informatik.uni-hamburg.de>
Date: Mon, 8 Jun 2015 16:04:25 +0200
Subject: [PATCH] [core] according to issue #279 RandomByteIterator now
 generates also some characters

---
 core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java b/core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java
index 65db4335..cb0977aa 100644
--- a/core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java
+++ b/core/src/main/java/com/yahoo/ycsb/RandomByteIterator.java
@@ -34,11 +34,11 @@ public class RandomByteIterator extends ByteIterator {
     int bytes = Utils.random().nextInt();
     try {
       buffer[base+0] = (byte)(((bytes) & 31) + ' ');
-      buffer[base+1] = (byte)(((bytes >> 5) & 31) + ' ');
-      buffer[base+2] = (byte)(((bytes >> 10) & 31) + ' ');
+      buffer[base+1] = (byte)(((bytes >> 5) & 63) + ' ');
+      buffer[base+2] = (byte)(((bytes >> 10) & 95) + ' ');
       buffer[base+3] = (byte)(((bytes >> 15) & 31) + ' ');
-      buffer[base+4] = (byte)(((bytes >> 20) & 31) + ' ');
-      buffer[base+5] = (byte)(((bytes >> 25) & 31) + ' ');
+      buffer[base+4] = (byte)(((bytes >> 20) & 63) + ' ');
+      buffer[base+5] = (byte)(((bytes >> 25) & 95) + ' ');
     } catch (ArrayIndexOutOfBoundsException e) { /* ignore it */ }
   }
 
-- 
GitLab