Here you can find the source of getAsString(ResultSet res, String field)
public static String getAsString(ResultSet res, String field) throws SQLException, IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static String getAsString(ResultSet res, String field) throws SQLException, IOException { String ret = res.getString(field); if (ret == null) { return ""; } else {//from w w w . j a v a2s. co m return ret; } } }