- 博客(13)
- 资源 (6)
- 收藏
- 关注
转载 Discover the secrets of the Java Serialization API
We all know the Java platform allows us to create reusable objects in memory. However, all of those objects exist only as long as the Java virtual machine1 remains running. It would be nice if the o
2012-01-31 15:04:43
337
转载 Quartz scheduler 简介
Quartz scheduler是一款优秀的Java调度器,开发人员可以很容易的将需调度的任务(task)加入调度器(scheduler)中调度运行。如何将task加入调度器,我们首先介绍几个概念:Scheduler Task – 纯Java类,就是开发人员需要调度的任务。Scheduler Job – 通过JobDetail获得执行任务的详细信息,定义执行方式。类似于执行模板,核
2012-01-31 14:46:27
2721
转载 Difference between Externalizable and Serializable in Java
One obvious difference that Serializable is a marker interface and doesn't contain any methods whereasExternalizable interface contains two methods:writeExternal(ObjectOutput) and readExternal
2012-01-30 17:22:55
406
转载 Discover the secrets of the Java Serialization API
We all know the Java platform allows us to create reusable objects in memory. However, all of those objects exist only as long as the Java virtual machine1 remains running. It would be nice if the o
2012-01-30 17:11:05
381
转载 When parameters are available in post request.
The following are the conditions that must be met before post form data will be populated to the parameter set:1. The request is an HTTP or HTTPS request.2. The HTTP method is POST.3. The conten
2012-01-30 17:05:45
892
转载 Http request header -- Connection
ConnectionThe Connection general-header field allows the sender to specify options that are desired for that particular connection and MUST NOT be communicated by proxies over further connections.
2012-01-30 16:57:44
1451
原创 Java Map中的的数据保持插入顺序
最近在项目中希望Map中的数据保持插入时的顺序。通过查看Java源代码,LinkedHashMap 可以保持插入时的顺序。LinkedHashMap 中的accessOrder属性负责Map中数据的顺序。 accessOrder为true时,Map中的数据按照访问顺序排序, false时按照插入顺序排序,默认LinkedHashMap 按插入顺序排序。详情请参阅LinkedHashMap 注释
2012-01-30 16:30:27
5436
转载 java对象序列化学习笔记
目前网络上关于对象序列化的文章不少,但是我发现详细叙述用法和原理的文章太少。本人把自己经过经验总结和实际运用中的体会写成的学习笔记贡献给大家。希望能为整个java社区的繁荣做一点事情。 序列化的过程就是对象写入字节流和从字节流中读取对象。将对象状态转换成字节流之后,可以用java.io包中的各种字节流类将其保存到文件中,管道到另一线程中或通过网络连接将对象数据发送到另一主机。对象序列化功
2012-01-30 11:16:19
314
转载 Top 10 Java Serialization Interview questions
Java Serialization is one of important concept but it’s been rarely used as persistence solution and developer mostly overlooked java serialization API. As per my experience Java Serialization is qui
2012-01-30 11:13:07
441
原创 Tomcat 应用目录重定向
Tomcat中的默认应用目录是Tomcat/webapps,在开发过程中为了避免每次编译后都拷贝应用文件,我们可以重定向应用文件路径。1. 在Tomcat/conf/Catalina/localhost 路径下创建相应的文件(例如:experiment.xml)。2. 编辑文件内容如下:3. docBase 代表重定向路径,path代表访问相对路径。4. 我们可以通过htt
2011-12-21 16:32:24
1665
原创 Tomcat 调试
开发Tomcat应用中,远程调试的方法:1. 在Tomcat/bin文件夹中创建debug.bat文件。2. 文件中输入set CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999star
2011-12-21 16:26:24
374
转载 Java 1.7的新特性
下面是Java 1.7里新出现的功能的一些用法例子:对集合的支持创建List / Set / Map 时写法更简单了。List String> list = ["item"]; String item = list[0]; Set String > set = {"item"}; Map String,Integer > map = {"key" : 1}; int value
2011-12-14 13:20:14
263
转载 JDK中的设计模式
下面是JDK中有关23个经典设计模式的示例:Structural(结构模式)Adapter:把一个接口或是类变成另外一种。● java.util.Arrays#asList()● javax.swing.JTable(TableModel)● java.io.InputStreamReader(InputStream)● java.io.OutputStreamWrit
2011-12-14 13:18:50
251
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人