java
xushaoxun
这个作者很懒,什么都没留下…
展开
-
日期处理
DateFormat DF = // 2006-12-12 11:54:47 格式 DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM); Calendar cal = GregorianCalen...2006-12-15 12:01:25 · 78 阅读 · 0 评论 -
regexp 简单运用
//split String s = "hello world i am 23 years"; String[] ss = s.split("\\s"); //replace s.replaceAll("\\s", "#"); s.replaceFirst("\\d", "#");原创 2008-06-23 10:37:38 · 131 阅读 · 0 评论 -
Class简单使用
//how to get classClass clazz = String.class;clazz = int.class;String s = "abc";clazz = s.getClass();clazz = Class.forName("java.util.ArrayList");//create instance using default con...2008-06-24 10:07:07 · 80 阅读 · 0 评论 -
ImageServlet
public class ImageServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { //get the image...2008-05-29 14:26:58 · 156 阅读 · 0 评论 -
java IO
InputSteam & OutputSteamInputStream(InputStreamReader)BufferedInputStream: used as other input stream's wrapper.ByteArrayInputStream: new ByteArrayInputStream(byteContent), A ByteArrayIn...2008-07-14 13:51:22 · 80 阅读 · 0 评论