Here you can find the source of isClosed(PreparedStatement ps, boolean defaultValue)
public static boolean isClosed(PreparedStatement ps, boolean defaultValue)
//package com.java2s; //License from project: LGPL import java.sql.PreparedStatement; public class Main { public static boolean isClosed(PreparedStatement ps, boolean defaultValue) { try {/* w w w . j ava 2s . c o m*/ return ps.isClosed(); } catch (Throwable t) { return defaultValue; } } }