private byte[] getBlobData(ResultSet resultSet, int columnIndex) throws SQLException {
    Blob blob = resultSet.getBlob(columnIndex);
    if (blob == null) {
      return null;
    }
    try {
      long blobLength = blob.length();
      if (blobLength > Integer.MAX_VALUE) {
        throw new JdbcConnectorException(
            "Blob of length " + blobLength + " is too big to be converted to a byte array.");
      }
      return blob.getBytes(1, (int) blobLength);
    } finally {
      blob.free();
    }
  }
If the given column contains a Blob returns its data as a byte array;
otherwise return null.

@throws JdbcConnectorException if blob is too big to fit in a byte array
geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlToPdxInstance.java