abstract class Buffer
Posted on 2011-12-31 11:13 cooperzh 閱讀(176) 評論(0) 編輯 收藏 所屬分類: java.nio.*; 、public 、類java.nio.buffer
protected 方法
實際上還要同時保證(off+len)不能超過Integer.MAX_VALUE而變為負數
public final 方法
- capacity()
- position()
- postition(int)
- limit()
- limit(int)
- mark()
- reset()
- clear()
- flip()
- rewind()
- remaining()
- hasremaining()
public abstract 方法
- isReadOnly()
- hasArray()
- array()
- arrayOffset()
- isDirect()
protected final 方法
- nextGetIndex()
- nextGetIndex(int)
- nextPutIndex()
- nextPutIndex(int)
- checkIndex(int)
- checkIndex(int,int)
- markValue()
protected 方法
checkBounds(int off, int len, int size);
判斷是否同時存在:off>=0, len>=0, (off+len)>=size,不存在則報IndexOutOfBoundsException異常實際上還要同時保證(off+len)不能超過Integer.MAX_VALUE而變為負數