Java SQL Blob safeFree(Blob blob)

Here you can find the source of safeFree(Blob blob)

Description

Safely free a blob.

License

Open Source License

Declaration

public static final void safeFree(Blob blob) 

Method Source Code


//package com.java2s;
import java.sql.Blob;

import java.sql.Clob;

public class Main {
    /**//from   www. ja  v a2 s.  com
     * Safely free a blob.
     */
    public static final void safeFree(Blob blob) {
        if (blob != null) {
            try {
                blob.free();
            } catch (Exception ignore) {
            }
        }
    }

    /**
     * Safely free a clob.
     */
    public static final void safeFree(Clob clob) {
        if (clob != null) {
            try {
                clob.free();
            } catch (Exception ignore) {
            }
        }
    }
}

Related

  1. getStringValue(Blob blob)
  2. isBlob(Object object)
  3. readBlob(Blob blob)
  4. readBytes(Blob blob, byte[] defaultValue)
  5. safeFree(Blob blob)
  6. toByteArray(Blob blob)
  7. writeStringToBlob(String value, PreparedStatement preparedStatement, int index)
  8. writeToBlob(int index, PreparedStatement ps, byte[] data)