value = convertForWrite(IOUtils.toByteArray((InputStream)value));
} catch (IOException ex) {
throw new RuntimeException("Unable to convert input stream to byte array.");
}
}
<BUG>else if (value instanceof byte[]) {
value = DatatypeConverter.printBase64Binary((byte[])value);
}
else if (value != null && !isValidPrimitveType(value.getClass())) {
throw new IllegalArgumentException("Data type not supported for NoSqlValueMap: " + value.getClass());</BUG>
}

value = convertForWrite(IOUtils.toByteArray((InputStream)value));
} catch (IOException ex) {
throw new RuntimeException("Unable to convert input stream to byte array.");
}
}
else if (value != null && !isValidType(value.getClass())) {
throw new IllegalArgumentException("Data type not supported for NoSqlValueMap: " + value.getClass());
}
