private String blobToPostgresHex(Blob blobData) throws SQLException {

        String returnData = "";

        if (blobData != null) {
            try {
                byte[] bytes = blobData.getBytes(1, (int) blobData.length());

                returnData = bytesToPostgresHex(bytes);
            } finally {
                // The most important thing here is free the BLOB to avoid memory Leaks
                blobData.free();
            }
        }

        return returnData;

    }
******************************************************************************************
From BLOB to Hexadecimal String for Postgres Copy
@return string representation of blob
*******************************************************************************************
src/main/java/org/replicadb/manager/PostgresqlManager.java