code: public <T> T toBlob() throws DatabaseEngineRuntimeException {
          if (isNull()) {
              return null;
          }
  
          InputStream is;
          if (val instanceof Blob) {
              try {
                  is = ((Blob) val).getBinaryStream();
              } catch (final SQLException e) {
                  throw new DatabaseEngineRuntimeException("Error getting blob input stream", e);
              }
          } else if (val instanceof byte[]) {
              is = new ByteArrayInputStream((byte[]) val);
          }
docs: Converts this result (in the form of blob) to the specified object type.
  
  @param <T> The type to convert.
  @return The instance that was in the form of blob.
  @throws DatabaseEngineRuntimeException If the value is not a blob or if
  something goes wrong when reading the object.