java.sql.SQLException: Before start of result set

Java
if (rs.next() {
    InputStream stream = rs.getBinaryStream(1);
    ...
Source

Also in Java: