- 浏览: 8629 次
- 性别:
- 来自: 深圳
最新评论
文章列表
JSONUtil.writeJSONToResponse(SerializationParams serializationParams)
...
try {
out = new GZIPOutputStream(response.getOutputStream());
in = new ByteArrayInputStream(json.getBytes());
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.wr ...
在Maven/conf/setting.xml的pluginRepositories节点下增加如下配置:
<pluginRepository>
<id>my repository</id>
<name>my repository</name>
<releases>
<enabled>false</enabled>
<updatePolicy> ...
- 2009-11-18 18:00
- 浏览 2528
- 评论(0)
Connection conn = null;
CallableStatement cs = null;
ResultSet rs = null;
try
{
// get connection
cs = conn.prepareCall("{call SP_TEST(?, ?)}");
cs.registerOutParameter(1, Types.INTEGER);
cs.registerOutParameter(2. Types.VARCHAR);
cs.execute();
do
...
- 2009-07-21 14:07
- 浏览 2916
- 评论(0)
生成key
keytool -genkey -alias tomcat -keyalg RSA -keypass mypwd -storepass mypwd -keystore server.keystore -validity 3600
将key导出到证书
keytool -export -trustcacerts -alias tomcat -file server.cer -keystore server.keystore -storepass mypwd
将证数导入到Java信任证书列表
keytool -import -trustcacerts -alias tomcat -f ...
一般字符串转日期代码:
public static Date parse(String source)
{
if (source == null)
{
return null;
}
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");;
try
{
return format.parse(source);
}
catch (ParseException e)
{
...
- 2009-06-08 22:07
- 浏览 765
- 评论(0)
一般由字符串转换为数字会用到如下的代码
public static Number parse(String source)
{
if (source == null)
{
return null;
}
NumberFormat format = NumberFormat.getInstance();
try
{
return format.parse(source);
}
catch (ParseException e)
{
ret ...
- 2009-06-08 21:48
- 浏览 754
- 评论(0)