Here you can find the source of getString(Blob blob)
public static String getString(Blob blob) throws UnsupportedEncodingException, SQLException, IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.sql.Blob; import java.sql.SQLException; public class Main { public static String getString(Blob blob) throws UnsupportedEncodingException, SQLException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(blob.getBinaryStream(), "utf-8")); String s = null;//from w ww .j a v a2s . c o m StringBuilder sb = new StringBuilder(); while ((s = br.readLine()) != null) { sb.append(s); } return sb.toString(); } }