1 17 18 21 22 package org.quartz.impl.jdbcjobstore; 23 24 import java.io.ByteArrayInputStream ; 25 import java.io.IOException ; 26 import java.io.ObjectInputStream ; 27 import java.sql.ResultSet ; 28 import java.sql.SQLException ; 29 30 import org.apache.commons.logging.Log; 31 32 41 public class CloudscapeDelegate extends StdJDBCDelegate { 42 52 public CloudscapeDelegate(Log log, String tablePrefix, String instanceId) { 53 super(log, tablePrefix, instanceId); 54 } 55 56 68 public CloudscapeDelegate(Log log, String tablePrefix, String instanceId, 69 Boolean useProperties) { 70 super(log, tablePrefix, instanceId, useProperties); 71 } 72 73 77 94 protected Object getObjectFromBlob(ResultSet rs, String colName) 95 throws ClassNotFoundException , IOException , SQLException { 96 Object obj = null; 97 98 byte[] inputBytes = rs.getBytes(colName); 99 100 if (null != inputBytes) { 101 ByteArrayInputStream bais = new 102 ByteArrayInputStream (inputBytes); 103 104 ObjectInputStream in = new ObjectInputStream (bais); 105 try { 106 obj = in.readObject(); 107 } finally { 108 in.close(); 109 } 110 } 111 112 return obj; 113 } 114 } 115 116 | Popular Tags |