private?static??void?setScheduler()?throws?SchedulerException{
??SchedulerFactory?sf?=?new?StdSchedulerFactory();
??Scheduler?sched?=?sf.getScheduler();
??JobDetail?job?=Jo...
分类:
其他好文 时间:
2014-10-29 15:04:56
阅读次数:
121
1.throwable下面的子类分为两大类:Error 和 Exception2.如果方法上有throws Exception,则必须对异常进行处理: try{ 需要检测异常代码 }catch(Exception e){ 处理异常代码 }finally{ 一定会执行的代码 } 这里,如果没有进行t....
分类:
编程语言 时间:
2014-10-29 01:43:30
阅读次数:
198
@RequestMapping("/findByItem") public void findByItem(int pageNO,String userName,Date startDate,Date endDate,HttpServletResponse response)throws Excep...
分类:
编程语言 时间:
2014-10-28 23:41:23
阅读次数:
728
删除 Delservlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContent.....
分类:
Web程序 时间:
2014-10-28 13:40:03
阅读次数:
316
import org.junit.Test;
public class TestURL {
@Test
public void readUrl() throws Exception{
URL url = new URL("http://localhost:8088/gress/data/reportData_201401.xml?a=b");
System.out.pr...
分类:
编程语言 时间:
2014-10-28 12:21:21
阅读次数:
166
文件切割器
private static final int SIZE = 1024 *1024;
public static void splitFile(File file) throws IOException{
//用读取流关联文件(不确定文件格式)
FileInputStream fis = new FileInputStream(file);//源是一个
...
分类:
编程语言 时间:
2014-10-27 21:21:08
阅读次数:
277
这篇看一下时限队列锁的一种实现方式。 java并发包中的Lock定义包含了时限锁的接口:
public interface Lock {
void lock();
void lockInterruptibly() throws InterruptedException;
boolean tryLock();
boolean tryLock(long t...
分类:
其他好文 时间:
2014-10-27 14:27:59
阅读次数:
169
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { MyBean myBean=new MyBean(); ...
分类:
其他好文 时间:
2014-10-27 06:55:23
阅读次数:
266
public class JDBCTest {// public static void main(String[] args) throws Exception {// Class.forName("com.mysql.jdbc.Driver");// Connection conn=Driv.....
分类:
数据库 时间:
2014-10-27 06:53:27
阅读次数:
214
1.Futrue
public interface Future //Future 表示异步计算的结果ExecutorService threadPool = Executors.newSingleThreadExecutor();
Future future = threadPool.submit(new Callable() {
public String call() throws Ex...
分类:
编程语言 时间:
2014-10-26 15:40:38
阅读次数:
159