Java examples for java.sql:Blob
get From Blob
//package com.java2s; import java.sql.Blob; import java.sql.SQLException; public class Main { static public String getFromBlob(Blob blob) { String result = null;/*from w w w . j a v a2s .c o m*/ byte[] bdata; try { if (blob != null) { bdata = blob.getBytes(1, (int) blob.length()); result = new String(bdata); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(System.out); } return result; } }