04 2014 档案
摘要:"equals(Object obj)" and "hashCode()" should be overridden in pairsAccording to the Java Language Specification, there is a contract between equals(Ob...
阅读全文
摘要:Thread.run() and Runnable.run() should not be called directly multithreadingThe purpose of the Thread.run() and Runnable.run() methods is to execute c...
阅读全文
摘要:缓冲区几个基本概念:position, 当前位置属性limit, 上界属性, put()/get() 时索引位置不允许超过上界值, put()超过上界则抛出BufferOverflowException(溢出), get() 超过上界则抛出BufferUnderflowException(暗流)capacity, 缓冲区总容量.mark, 保存的位置值, 通过mark() 设置, 设置之后可以通过reset()返回到这个位置mark = 0 || buf.position != 0) { buf.flip(); out.write(buf); buf.compact(); // I...
阅读全文
浙公网安备 33010602011771号