I am trying to retrieve a blob from a postgres database using the jdbc drivers. It is too big to have in memory so I want to stream it as a download. I tried using the get
byte [] b = null;
while (m_ResultSet.next()) {
for (int i = 1; i <= m_ResultSet.getMetaData().getColumnCount(); i++) {
b = m_ResultSet.getBytes(i);
}
}
String str = "";
for (byte i : b){
str+=(char)i;
}