标签:csdn 源码 end call 阅读 date ted chain 线程
getWriter() has already been called for this response
reason: getWriter和getOutputStream(chain.doFilter(request, response);) 二者只能选其一,调用了其中一个就不能调用另一个了
3 ways to cut out a string
System.currentTimeMillis() 的文档,原来这个方法调用了个native方法,获取的时间精度会依赖于操作系统的实现机制
在Java中可以通过System.currentTimeMillis()或者System.nanoTime() (JDK>=5.0) 方法获得当前的时间的精确值。但是通过阅读Javadoc,我们发现这两个方法并不一定保证得到你所期望的精度。先来看System.currentTimeMillis():
Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.
如何在windows上实现精确的毫秒计时呢。答案就是用“System.nanoTime()/1000000L”代替“System.currentTimeInMills()”
http://blog.csdn.net/paul_lh/article/details/6419982
秒的换算:ms(毫秒),μs(微秒),ns(纳秒),ps(皮秒)
SimpleDateFormat && Calendar is not thread safe
标签:csdn 源码 end call 阅读 date ted chain 线程
原文地址:https://www.cnblogs.com/xiaowater/p/9552896.html