`
justink
  • 浏览: 8629 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
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> ...
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 ...
生成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) { ...

Strict Number Parsing

    博客分类:
  • Java
一般由字符串转换为数字会用到如下的代码 public static Number parse(String source) { if (source == null) { return null; } NumberFormat format = NumberFormat.getInstance(); try { return format.parse(source); } catch (ParseException e) { ret ...
Global site tag (gtag.js) - Google Analytics