码迷,mamicode.com
首页 >  
搜索关键字:throws    ( 4120个结果
mahout学习(三)
public class TMahout03 { public static void main(String[] args) throws IOException, TasteException { //-准确率和召回率评估的配置与运行-// RandomU...
分类:其他好文   时间:2014-09-02 13:53:24    阅读次数:257
根据链接获取网页内容
public static String getContent(String strUrl) throws Exception { try { URL url = new URL(strUrl); BufferedReader br = new BufferedReader(new Inp...
分类:Web程序   时间:2014-08-29 12:48:07    阅读次数:229
spring框架中一个跟String的trim方法一样的方法
@Test public void testTrimWhitespace() throws Exception { assertEquals(null, StringUtils.trimWhitespace(null)); assertEquals("", ...
分类:编程语言   时间:2014-08-29 01:16:56    阅读次数:418
thread相关http://blog.csdn.net/forwayfarer/article/details/3455130
1.sleep()和wait()这两个方法都可以让调用它的线程沉睡(sleep)/停止运行(wait)指定的时间,到了这个时间,线程就会自动醒来,变为可运行状态(RUNNABLE)。public static native void sleep(long millis) throws Interr....
分类:Web程序   时间:2014-08-28 17:53:25    阅读次数:388
利用反射 复制一个对象
public static Object copy(Object obj) throws Exception{ Class classType = obj.getClass(); // 利用无参构造一个对象 Object copyOj = classType.getConstructo...
分类:其他好文   时间:2014-08-28 12:47:39    阅读次数:173
Hibernate 分页
public EmailBean[] findByPage(Date begin, Date end, String emailreference, int pageNo, final int pageSize, String status) throws AIException { ...
分类:系统相关   时间:2014-08-28 11:01:51    阅读次数:234
Map/Reduce的类体系架构
Map/Reduce的类体系架构Map/Reduce案例解析: 先以简单的WordCount例程, 来讲解如何去描述Map/Reduce任务.public static void main(String[] args) throws Exception { // *) 创建Configurati.....
分类:其他好文   时间:2014-08-27 20:32:28    阅读次数:194
jdk动态代理与cglib动态代理
JDK动态代理中包含一个类和一个接口:InvocationHandler接口:public interface InvocationHandler {public Object invoke(Object proxy,Method method,Object[] args) throws Throw...
分类:其他好文   时间:2014-08-26 16:53:56    阅读次数:243
线程交替有序执行任务
public class Test { // 测试 public static void main(String[] args) throws Exception { Object obj = new Object(); // 启动两个线程 Thread1 t1 = new Thread1(obj); Thread2 t2 = new Thread2(obj); t1...
分类:编程语言   时间:2014-08-26 15:36:46    阅读次数:178
struts2配置log
Struts2初始化时,首先就会初始化log,看源码如下: 1 public void init(FilterConfig filterConfig) throws ServletException { 2 InitOperations init = new InitOperatio...
分类:其他好文   时间:2014-08-26 13:22:16    阅读次数:207
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!