I wrote a little application in Java to display my Cassandra DB entries like this
String do = "Select * from cert;";`
ResultSet results = session.execute(do);
for (Row row : results) {
System.out.format("%s %s\n", row.getString("name"), row.getBytesUnsafe("cer"));
session.close();
cluster.close();
How can I display the "cer" column like it is shown in the command prompt?
Create table cert (name varchar Primary key, cer blob);
INSERT INTO cert (name, cer) VALUES ('fred', bigintAsBlob(3));
name | cer
------+--------------------
fred | 0x0000000000000003`
I don't know which string formatter I had to use, I only get
java.nio.HeapByteBuffer[pos=0 lim=8 cap=8]
with "%s" or
true
with "%b".