Date date=new Date();
SimpleDateFormat sf=new SimpleDateFormat("yyyyMMddHHmmss");
String strdate=sf.format(date);各位大大,strdate能转换成16位的ascii码么?怎么转?
解决方案 »
- hibernate 日期问题。【很急】
- hibernate 的联合主键
- 我想把TOMCAT在服务器重启后自动跟着打开,该如何做?
- resin能发布的程序,为什么tomcat 发布不了?
- JSP中如何向PostgreSQL中插入日期?
- Note: sun.tools.javac.Main has been deprecated.
- JDK低版本程序向高版本中运行问题
- 我在JSP里用response.sendRedirect("aa.jsp") 为什么session就自动失效?
- 关于Session的问题
- 用jsp如何动态显示时间!(菜鸟问题!)
- apache ftp server磁盘管理
- jsp能不能做到在线视屏聊天
byte[] arrB = strIn.getBytes();
int iLen = arrB.length; // 两个字符表示一个字节,所以字节数组长度是字符串长度除以2
byte[] arrOut = new byte[iLen / 2];
for (int i = 0; i < iLen; i = i + 2) {
String strTmp = new String(arrB, i, 2);
arrOut[i / 2] = (byte) Integer.parseInt(strTmp, 16);
}
return arrOut;
}